Commit 9abe07c6 by Jamie Madill Committed by Commit Bot

Move Platform Context pointer to start of struct.

This will ensure that new methods (placed at the end) don't collide with the context pointer when using a mismatched platform. BUG=angleproject:1892 Change-Id: Ice6a3ccaf3cc2a1e36a04bc217386cf096612176 Reviewed-on: https://chromium-review.googlesource.com/672147Reviewed-by: 's avatarFrank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 7aa786c8
...@@ -266,10 +266,12 @@ inline void DefaultCacheProgram(PlatformMethods *platform, ...@@ -266,10 +266,12 @@ inline void DefaultCacheProgram(PlatformMethods *platform,
struct PlatformMethods struct PlatformMethods
{ {
ANGLE_PLATFORM_OP(ANGLE_PLATFORM_METHOD_DEF); // User data pointer for any implementation specific members. Put it at the start of the
// platform structure so it doesn't become overwritten if one version of the platform
// User data pointer for any implementation specific members. // adds or removes new members.
void *context = 0; void *context = 0;
ANGLE_PLATFORM_OP(ANGLE_PLATFORM_METHOD_DEF);
}; };
#undef ANGLE_PLATFORM_METHOD_DEF #undef ANGLE_PLATFORM_METHOD_DEF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment