|
|
Created:
6 years, 4 months ago by boliu Modified:
6 years, 4 months ago Reviewers:
hush (inactive) CC:
chromium-reviews, android-webview-reviews_chromium.org, benm (inactive) Base URL:
svn://svn.chromium.org/chrome/trunk/src Project:
chromium Visibility:
Public. |
Descriptionaw: Add versions to public function tables
BUG=399370
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287810
Patch Set 1 #
Total comments: 4
Patch Set 2 : roll aosp #
Messages
Total messages: 21 (0 generated)
Missed these last time :/
https://codereview.chromium.org/433603005/diff/1/android_webview/public/brows... File android_webview/public/browser/draw_gl.h (right): https://codereview.chromium.org/433603005/diff/1/android_webview/public/brows... android_webview/public/browser/draw_gl.h:89: static const int kAwDrawGLFunctionTableVersion = 1; what is the circumstance that AwDrawGLFunctionTableVersion is different from AwDrawGLInfoVersion? Should they always be the same version?
https://codereview.chromium.org/433603005/diff/1/android_webview/public/brows... File android_webview/public/browser/draw_gl.h (right): https://codereview.chromium.org/433603005/diff/1/android_webview/public/brows... android_webview/public/browser/draw_gl.h:89: static const int kAwDrawGLFunctionTableVersion = 1; I guess every time you add something to the struct, you need to increase the version number by 1. And you are not supposed to delete members from the struct. Right? On 2014/07/31 21:03:50, hush wrote: > what is the circumstance that AwDrawGLFunctionTableVersion is different from > AwDrawGLInfoVersion? Should they always be the same version?
https://codereview.chromium.org/433603005/diff/1/android_webview/public/brows... File android_webview/public/browser/draw_gl.h (right): https://codereview.chromium.org/433603005/diff/1/android_webview/public/brows... android_webview/public/browser/draw_gl.h:89: static const int kAwDrawGLFunctionTableVersion = 1; On 2014/07/31 21:03:50, hush wrote: > what is the circumstance that AwDrawGLFunctionTableVersion is different from > AwDrawGLInfoVersion? Should they always be the same version? They can change independently. For example if we switch to idle upload, we can drop all the gralloc functions from the table below, which is ehh...everything. But nothing changes to AwDrawGLInfoVersion
https://codereview.chromium.org/433603005/diff/1/android_webview/public/brows... File android_webview/public/browser/draw_gl.h (right): https://codereview.chromium.org/433603005/diff/1/android_webview/public/brows... android_webview/public/browser/draw_gl.h:89: static const int kAwDrawGLFunctionTableVersion = 1; On 2014/07/31 21:09:38, boliu wrote: > On 2014/07/31 21:03:50, hush wrote: > > what is the circumstance that AwDrawGLFunctionTableVersion is different from > > AwDrawGLInfoVersion? Should they always be the same version? > > They can change independently. For example if we switch to idle upload, we can > drop all the gralloc functions from the table below, which is ehh...everything. > But nothing changes to AwDrawGLInfoVersion Right that's the idea. And you can't access new members based on version. Binary stability..
On 2014/07/31 21:09:38, boliu wrote: > https://codereview.chromium.org/433603005/diff/1/android_webview/public/brows... > File android_webview/public/browser/draw_gl.h (right): > > https://codereview.chromium.org/433603005/diff/1/android_webview/public/brows... > android_webview/public/browser/draw_gl.h:89: static const int > kAwDrawGLFunctionTableVersion = 1; > On 2014/07/31 21:03:50, hush wrote: > > what is the circumstance that AwDrawGLFunctionTableVersion is different from > > AwDrawGLInfoVersion? Should they always be the same version? > > They can change independently. For example if we switch to idle upload, we can > drop all the gralloc functions from the table below, which is ehh...everything. > But nothing changes to AwDrawGLInfoVersion Oh. Okay. So you can remove things from the struct. This means you need to exact match of version number instead of doing less than/greater than comparison to claim the version of struct contains the data you want or not.
On 2014/07/31 21:13:18, hush wrote: > Oh. Okay. > So you can remove things from the struct. This means you need to exact match of > version number instead of doing less than/greater than comparison to claim the > version of struct contains the data you want or not. Umm....I suppose you can, basically you use a union, and use the version number to switch. But feels too dangerous. Basically once things are frozen, you can never remove fields. You can deprecate them, but never remove them. Things are not frozen yet though.
On 2014/07/31 21:16:10, boliu wrote: > On 2014/07/31 21:13:18, hush wrote: > > Oh. Okay. > > So you can remove things from the struct. This means you need to exact match > of > > version number instead of doing less than/greater than comparison to claim the > > version of struct contains the data you want or not. > > Umm....I suppose you can, basically you use a union, and use the version number > to switch. But feels too dangerous. > > Basically once things are frozen, you can never remove fields. You can deprecate > them, but never remove them. > > Things are not frozen yet though. lgtm Okay. Let's not remove fields from the struct when you bump a version. Maybe a comment there would help?
The CQ bit was checked by boliu@chromium.org
On 2014/07/31 21:19:11, hush wrote: > Okay. Let's not remove fields from the struct when you bump a version. > Maybe a comment there would help? Don't anyone touch this file without my say!!
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/433603005/1
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/bu...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_aosp on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/bu...)
On 2014/08/01 00:19:02, I haz the power (commit-bot) wrote: > Try jobs failed on following builders: > android_aosp on tryserver.chromium.linux > (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/bu...) frameworks/webview/chromium/plat_support/graphics_utils.cpp: In function 'jlong android::{anonymous}::GetDrawSWFunctionTable(JNIEnv*, jclass)': frameworks/webview/chromium/plat_support/graphics_utils.cpp:88:3: error: invalid conversion from 'AwPixelInfo* (*)(JNIEnv*, jobject) {aka AwPixelInfo* (*)(_JNIEnv*, _jobject*)}' to 'int' [-fpermissive] }; ^ frameworks/webview/chromium/plat_support/graphics_utils.cpp:88:3: error: invalid conversion from 'void (*)(AwPixelInfo*)' to 'AwPixelInfo* (*)(JNIEnv*, jobject) {aka AwPixelInfo* (*)(_JNIEnv*, _jobject*)}' [-fpermissive] frameworks/webview/chromium/plat_support/graphics_utils.cpp:88:3: warning: missing initializer for member 'AwDrawSWFunctionTable::release_pixels' [-Wmissing-field-initializers] frameworks/webview/chromium/plat_support/graphics_utils.cpp: In function 'jlong android::{anonymous}::GetDrawGLFunctionTable(JNIEnv*, jclass)': frameworks/webview/chromium/plat_support/graphics_utils.cpp:100:3: error: invalid conversion from 'long int (*)(int, int)' to 'int' [-fpermissive] }; ^ frameworks/webview/chromium/plat_support/graphics_utils.cpp:100:3: error: invalid conversion from 'void (*)(long int)' to 'long int (*)(int, int)' [-fpermissive] frameworks/webview/chromium/plat_support/graphics_utils.cpp:100:3: error: invalid conversion from 'int (*)(long int, AwMapMode, void**)' to 'void (*)(long int)' [-fpermissive] frameworks/webview/chromium/plat_support/graphics_utils.cpp:100:3: error: invalid conversion from 'int (*)(long int)' to 'int (*)(long int, AwMapMode, void**)' [-fpermissive] frameworks/webview/chromium/plat_support/graphics_utils.cpp:100:3: error: invalid conversion from 'void* (*)(long int)' to 'int (*)(long int)' [-fpermissive] frameworks/webview/chromium/plat_support/graphics_utils.cpp:100:3: error: invalid conversion from 'uint32_t (*)(long int) {aka unsigned int (*)(long int)}' to 'void* (*)(long int)' [-fpermissive] frameworks/webview/chromium/plat_support/graphics_utils.cpp:100:3: warning: missing initializer for member 'AwDrawGLFunctionTable::get_stride' [-Wmissing-field-initializers] Import includes file: out/target/product/generic/obj/SHARED_LIBRARIES/libjavacore_intermediates/import_includes make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libwebviewchromium_plat_support_intermediates/plat_support/graphics_utils.o] Error 1 make: *** Waiting for unfinished jobs....
Yeah the current glue layer isn't written to allow new fields to be added. Need to fix that first
I think you need a frameworks/webview change for GraphicsUtils::GetDrawSWFunctionTable
The CQ bit was checked by boliu@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/433603005/20001
Rolled aosp btw, so it's green now.
Message was sent while issue was closed.
Change committed as 287810 |