Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(995)

Issue 26129009: Cache DeviceDisplayInfo data in shared structure on native side to avoid frequent JNI calls. (Closed)

Created:
7 years, 2 months ago by ostap
Modified:
7 years, 2 months ago
CC:
chromium-reviews, Inactive, lgombos
Base URL:
https://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Cache DeviceDisplayInfo data in shared structure on native side to avoid frequent JNI calls. BUG=265008 Partial fix for bug 265008. GetDisplayWidth and GetDisplayHeight are called for tile creation. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=230472

Patch Set 1 #

Total comments: 15

Patch Set 2 : Updated patch by review comments. #

Total comments: 7

Patch Set 3 : Updated by review comments. #

Total comments: 4

Patch Set 4 : Updated by review comments. #

Total comments: 7

Patch Set 5 : Rebased and updated by review comments. #

Patch Set 6 : Rebased and updated after cl 28053002 . #

Total comments: 15

Patch Set 7 : Updated by review comments. #

Total comments: 12

Patch Set 8 : Updated by review comments. #

Patch Set 9 : Re-uploaded by Yaron request. #

Total comments: 2

Patch Set 10 : Patch for commit. #

Patch Set 11 : Fix clang build issues. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+244 lines, -48 lines) Patch
M ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java View 1 2 3 4 5 3 chunks +35 lines, -1 line 0 comments Download
M ui/gfx/android/device_display_info.h View 1 2 3 4 5 2 chunks +0 lines, -6 lines 0 comments Download
M ui/gfx/android/device_display_info.cc View 1 2 3 4 5 1 chunk +7 lines, -38 lines 0 comments Download
M ui/gfx/android/gfx_jni_registrar.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
A ui/gfx/android/shared_device_display_info.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +68 lines, -0 lines 0 comments Download
A ui/gfx/android/shared_device_display_info.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +128 lines, -0 lines 0 comments Download
M ui/gfx/gfx.gyp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
ostap
Partial fix for bug 265008. GetDisplayWidth and GetDisplayHeight are called for tile creation. Thread attach ...
7 years, 2 months ago (2013-10-09 18:49:31 UTC) #1
Yaron
https://codereview.chromium.org/26129009/diff/1/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java File ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java (right): https://codereview.chromium.org/26129009/diff/1/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java#newcode117 ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java:117: mAppContext.registerComponentCallbacks( nit: indent 4 (also below) https://codereview.chromium.org/26129009/diff/1/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java#newcode122 ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java:122: } ...
7 years, 2 months ago (2013-10-10 11:52:45 UTC) #2
ostap
https://codereview.chromium.org/26129009/diff/1/ui/gfx/android/device_display_info.cc File ui/gfx/android/device_display_info.cc (right): https://codereview.chromium.org/26129009/diff/1/ui/gfx/android/device_display_info.cc#newcode139 ui/gfx/android/device_display_info.cc:139: j_device_info_.Reset(Java_DeviceDisplayInfo_create(env, On 2013/10/10 11:52:46, Yaron wrote: The problem that ...
7 years, 2 months ago (2013-10-10 15:34:40 UTC) #3
ostap
https://codereview.chromium.org/26129009/diff/1/ui/gfx/android/device_display_info.cc File ui/gfx/android/device_display_info.cc (right): https://codereview.chromium.org/26129009/diff/1/ui/gfx/android/device_display_info.cc#newcode46 ui/gfx/android/device_display_info.cc:46: struct ScopedReadLock { On 2013/10/10 11:52:46, Yaron wrote: > ...
7 years, 2 months ago (2013-10-10 16:29:49 UTC) #4
ostap
1. Move SharedDeviceDisplayInfo to the separate file. 2. Use LazyInstance instead of scoped_ptr 3. Replaced ...
7 years, 2 months ago (2013-10-10 20:08:22 UTC) #5
Yaron
https://codereview.chromium.org/26129009/diff/8001/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java File ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java (right): https://codereview.chromium.org/26129009/diff/8001/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java#newcode120 ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java:120: public void registerListener() { private https://codereview.chromium.org/26129009/diff/8001/ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java#newcode125 ui/android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java:125: updateNativeSharedDisplayInfo(); indent ...
7 years, 2 months ago (2013-10-11 10:18:14 UTC) #6
ostap
Patch was updated by review comments.
7 years, 2 months ago (2013-10-11 13:39:37 UTC) #7
Alexei Svitkine (slow)
https://codereview.chromium.org/26129009/diff/17001/ui/gfx/android/shared_device_display_info.cc File ui/gfx/android/shared_device_display_info.cc (right): https://codereview.chromium.org/26129009/diff/17001/ui/gfx/android/shared_device_display_info.cc#newcode49 ui/gfx/android/shared_device_display_info.cc:49: void UpdateSharedDeviceDisplayInfo(JNIEnv* env, This should be in anon namespace ...
7 years, 2 months ago (2013-10-11 14:13:05 UTC) #8
ostap
Patch was updated by review comments.
7 years, 2 months ago (2013-10-11 16:15:18 UTC) #9
Alexei Svitkine (slow)
Please reply to comments directly (e.g. when you click on a comment link, you can ...
7 years, 2 months ago (2013-10-15 15:13:07 UTC) #10
ostap
https://codereview.chromium.org/26129009/diff/24001/ui/gfx/android/shared_device_display_info.h File ui/gfx/android/shared_device_display_info.h (right): https://codereview.chromium.org/26129009/diff/24001/ui/gfx/android/shared_device_display_info.h#newcode59 ui/gfx/android/shared_device_display_info.h:59: friend class Singleton<SharedDeviceDisplayInfo>; On 2013/10/15 15:13:07, Alexei Svitkine wrote: ...
7 years, 2 months ago (2013-10-15 18:41:24 UTC) #11
Alexei Svitkine (slow)
https://codereview.chromium.org/26129009/diff/24001/ui/gfx/android/shared_device_display_info.cc File ui/gfx/android/shared_device_display_info.cc (right): https://codereview.chromium.org/26129009/diff/24001/ui/gfx/android/shared_device_display_info.cc#newcode28 ui/gfx/android/shared_device_display_info.cc:28: int SharedDeviceDisplayInfo::GetDisplayHeight() { How about making these non-static and ...
7 years, 2 months ago (2013-10-15 18:46:47 UTC) #12
ostap
https://codereview.chromium.org/26129009/diff/24001/ui/gfx/android/shared_device_display_info.cc File ui/gfx/android/shared_device_display_info.cc (right): https://codereview.chromium.org/26129009/diff/24001/ui/gfx/android/shared_device_display_info.cc#newcode15 ui/gfx/android/shared_device_display_info.cc:15: void UpdateSharedDeviceDisplayInfo(JNIEnv* env, On 2013/10/15 15:13:07, Alexei Svitkine wrote: ...
7 years, 2 months ago (2013-10-15 19:41:26 UTC) #13
Yaron
On 2013/10/15 19:41:26, ostap wrote: > https://codereview.chromium.org/26129009/diff/24001/ui/gfx/android/shared_device_display_info.cc > File ui/gfx/android/shared_device_display_info.cc (right): > > https://codereview.chromium.org/26129009/diff/24001/ui/gfx/android/shared_device_display_info.cc#newcode15 > ...
7 years, 2 months ago (2013-10-22 00:19:57 UTC) #14
ostap
On 2013/10/22 00:19:57, Yaron wrote: > Overall, sorry but I lost track: what's the status ...
7 years, 2 months ago (2013-10-22 07:24:30 UTC) #15
ostap
Patch was rebased.
7 years, 2 months ago (2013-10-22 19:06:45 UTC) #16
Alexei Svitkine (slow)
https://codereview.chromium.org/26129009/diff/24001/ui/gfx/android/shared_device_display_info.cc File ui/gfx/android/shared_device_display_info.cc (right): https://codereview.chromium.org/26129009/diff/24001/ui/gfx/android/shared_device_display_info.cc#newcode15 ui/gfx/android/shared_device_display_info.cc:15: void UpdateSharedDeviceDisplayInfo(JNIEnv* env, On 2013/10/15 19:41:27, ostap wrote: > ...
7 years, 2 months ago (2013-10-22 19:15:24 UTC) #17
ostap
https://codereview.chromium.org/26129009/diff/64001/ui/gfx/android/shared_device_display_info.cc File ui/gfx/android/shared_device_display_info.cc (right): https://codereview.chromium.org/26129009/diff/64001/ui/gfx/android/shared_device_display_info.cc#newcode12 ui/gfx/android/shared_device_display_info.cc:12: using base::android::AttachCurrentThread; On 2013/10/22 19:15:24, Alexei Svitkine wrote: > ...
7 years, 2 months ago (2013-10-22 20:48:02 UTC) #18
Alexei Svitkine (slow)
LGTM % some final comments and nits Please wait for Yaron's review too. https://codereview.chromium.org/26129009/diff/124001/ui/gfx/android/gfx_jni_registrar.cc File ...
7 years, 2 months ago (2013-10-22 21:01:54 UTC) #19
ostap
https://codereview.chromium.org/26129009/diff/124001/ui/gfx/android/gfx_jni_registrar.cc File ui/gfx/android/gfx_jni_registrar.cc (right): https://codereview.chromium.org/26129009/diff/124001/ui/gfx/android/gfx_jni_registrar.cc#newcode17 ui/gfx/android/gfx_jni_registrar.cc:17: gfx::SharedDeviceDisplayInfo::RegisterSharedDeviceDisplayInfo }, On 2013/10/22 21:01:54, Alexei Svitkine wrote: > ...
7 years, 2 months ago (2013-10-22 21:40:41 UTC) #20
Yaron
It looks like part of the patch was eaten. I'm seeing "error: old chunk mismatch" ...
7 years, 2 months ago (2013-10-22 22:18:31 UTC) #21
ostap
On 2013/10/22 22:18:31, Yaron wrote: > It looks like part of the patch was eaten. ...
7 years, 2 months ago (2013-10-22 22:41:41 UTC) #22
Yaron
lgtm Thanks for the patch https://codereview.chromium.org/26129009/diff/304001/ui/gfx/android/shared_device_display_info.cc File ui/gfx/android/shared_device_display_info.cc (right): https://codereview.chromium.org/26129009/diff/304001/ui/gfx/android/shared_device_display_info.cc#newcode12 ui/gfx/android/shared_device_display_info.cc:12: using base::android::AttachCurrentThread; Nit: remove
7 years, 2 months ago (2013-10-22 22:58:30 UTC) #23
ostap
https://codereview.chromium.org/26129009/diff/304001/ui/gfx/android/shared_device_display_info.cc File ui/gfx/android/shared_device_display_info.cc (right): https://codereview.chromium.org/26129009/diff/304001/ui/gfx/android/shared_device_display_info.cc#newcode12 ui/gfx/android/shared_device_display_info.cc:12: using base::android::AttachCurrentThread; On 2013/10/22 22:58:30, Yaron wrote: > Nit: ...
7 years, 2 months ago (2013-10-22 23:06:54 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/26129009/364001
7 years, 2 months ago (2013-10-22 23:14:00 UTC) #25
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 2 months ago (2013-10-22 23:51:06 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/26129009/544001
7 years, 2 months ago (2013-10-23 15:19:38 UTC) #27
commit-bot: I haz the power
7 years, 2 months ago (2013-10-23 18:18:16 UTC) #28
Message was sent while issue was closed.
Change committed as 230472

Powered by Google App Engine
This is Rietveld 408576698