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

Issue 281003002: Make ui::Snapshot asynchronous on Android, remove CompositeAndReadback. (Closed)

Created:
6 years, 7 months ago by danakj
Modified:
6 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, piman+watch_chromium.org, enne (OOO), piman, bajones, Zhenyao Mo
Visibility:
Public.

Description

Make ui::Snapshot asynchronous on Android, remove CompositeAndReadback. The android pixel tests use the ui::Snapshot code to get a pixel copy of the content_shell's output. Make this behaviour match the aura implementation of ui::Snapshot by returning false in the synchronous verion, causing callsites to fall back to the async one. This implements the async snapshots by moving the aura implementation out into snapshot_async.cc and reusing that code (with one #if for RGBA vs BGRA ordering). After this, the pixel tests get a bitmap from cc instead of creating their own bitmap. The result is that the bitmap has a slightly different size (384x528) which is the size of the root layer. The pixel tests were previously trying to crop to 400x300, which is outside the bounds of this bitmap, so change them to crop to 300x300 instead, and increment their versions to pick up the new pngs. BUG=252046, 371592 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270778

Patch Set 1 #

Total comments: 4

Patch Set 2 : pixeltests: cleanup #

Patch Set 3 : pixeltests: expectations #

Total comments: 2

Patch Set 4 : pixeltests: betterexpectations #

Total comments: 15

Patch Set 5 : pixeltests: feedback #

Patch Set 6 : pixeltests: ios #

Patch Set 7 : pixeltests: ios2 #

Patch Set 8 : pixeltests: syntax #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -159 lines) Patch
M cc/output/copy_output_request.h View 1 2 3 4 2 chunks +1 line, -1 line 0 comments Download
M cc/output/copy_output_request.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M cc/output/copy_output_result.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M cc/output/copy_output_result.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/android/content_view_render_view.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/android/content_view_render_view.cc View 1 1 chunk +0 lines, -9 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java View 1 3 chunks +1 line, -15 lines 0 comments Download
M content/test/gpu/gpu_tests/pixel_expectations.py View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M content/test/gpu/page_sets/pixel_tests.py View 1 chunk +6 lines, -6 lines 0 comments Download
M ui/base/DEPS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M ui/base/android/window_android_compositor.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M ui/snapshot/snapshot.gyp View 1 2 3 4 5 6 7 3 chunks +15 lines, -2 lines 0 comments Download
M ui/snapshot/snapshot_android.cc View 1 2 3 4 2 chunks +36 lines, -22 lines 0 comments Download
A ui/snapshot/snapshot_async.h View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
A ui/snapshot/snapshot_async.cc View 1 2 3 4 1 chunk +103 lines, -0 lines 0 comments Download
M ui/snapshot/snapshot_aura.cc View 1 2 3 4 4 chunks +4 lines, -96 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
danakj
Thanks everyone for your help on this. sievers: please review tedchoc: please review ui/snapshot kbr: ...
6 years, 7 months ago (2014-05-13 23:07:18 UTC) #1
danakj
https://codereview.chromium.org/281003002/diff/1/content/browser/android/content_view_render_view.h File content/browser/android/content_view_render_view.h (right): https://codereview.chromium.org/281003002/diff/1/content/browser/android/content_view_render_view.h#newcode16 content/browser/android/content_view_render_view.h:16: class CopyOutputResult; oops some leftovers in here... *^^*
6 years, 7 months ago (2014-05-13 23:11:07 UTC) #2
danakj
https://codereview.chromium.org/281003002/diff/1/content/browser/android/content_view_render_view.h File content/browser/android/content_view_render_view.h (right): https://codereview.chromium.org/281003002/diff/1/content/browser/android/content_view_render_view.h#newcode16 content/browser/android/content_view_render_view.h:16: class CopyOutputResult; On 2014/05/13 23:11:09, danakj wrote: > oops ...
6 years, 7 months ago (2014-05-13 23:14:04 UTC) #3
Ken Russell (switch to Gerrit)
Thanks for fixing this. LGTM overall as long as this has been tested locally. One ...
6 years, 7 months ago (2014-05-13 23:14:44 UTC) #4
danakj
Yep I have tested this on my N4 and I get nice pngs back :) ...
6 years, 7 months ago (2014-05-13 23:18:06 UTC) #5
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/281003002/diff/40001/content/test/gpu/gpu_tests/pixel_expectations.py File content/test/gpu/gpu_tests/pixel_expectations.py (right): https://codereview.chromium.org/281003002/diff/40001/content/test/gpu/gpu_tests/pixel_expectations.py#newcode28 content/test/gpu/gpu_tests/pixel_expectations.py:28: ['android'], bug=371592) The temporary failure expectations are needed on ...
6 years, 7 months ago (2014-05-13 23:21:21 UTC) #6
danakj
https://codereview.chromium.org/281003002/diff/40001/content/test/gpu/gpu_tests/pixel_expectations.py File content/test/gpu/gpu_tests/pixel_expectations.py (right): https://codereview.chromium.org/281003002/diff/40001/content/test/gpu/gpu_tests/pixel_expectations.py#newcode28 content/test/gpu/gpu_tests/pixel_expectations.py:28: ['android'], bug=371592) On 2014/05/13 23:21:21, Ken Russell wrote: > ...
6 years, 7 months ago (2014-05-13 23:22:45 UTC) #7
Ken Russell (switch to Gerrit)
LGTM again.
6 years, 7 months ago (2014-05-13 23:28:27 UTC) #8
sky
https://codereview.chromium.org/281003002/diff/60001/ui/snapshot/snapshot_async.cc File ui/snapshot/snapshot_async.cc (right): https://codereview.chromium.org/281003002/diff/60001/ui/snapshot/snapshot_async.cc#newcode40 ui/snapshot/snapshot_async.cc:40: unsigned char* pixels = Don't you need to lockPixels ...
6 years, 7 months ago (2014-05-13 23:43:05 UTC) #9
no sievers
lgtm for android
6 years, 7 months ago (2014-05-13 23:57:53 UTC) #10
no sievers
https://codereview.chromium.org/281003002/diff/60001/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/281003002/diff/60001/content/browser/renderer_host/compositor_impl_android.cc#newcode625 content/browser/renderer_host/compositor_impl_android.cc:625: if (root_layer_) nit: The root_layer_ is always there
6 years, 7 months ago (2014-05-13 23:58:00 UTC) #11
Ted C
lgtm (addressing sky's feedback) https://codereview.chromium.org/281003002/diff/60001/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/281003002/diff/60001/content/browser/renderer_host/compositor_impl_android.cc#newcode625 content/browser/renderer_host/compositor_impl_android.cc:625: if (root_layer_) On 2014/05/13 23:58:00, ...
6 years, 7 months ago (2014-05-14 01:13:18 UTC) #12
danakj
sky: PTAL Thanks for the reviews! I had to add cc to the ui/base/DEPS since ...
6 years, 7 months ago (2014-05-14 14:33:20 UTC) #13
sky
LGTM
6 years, 7 months ago (2014-05-14 18:21:37 UTC) #14
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 7 months ago (2014-05-14 18:25:42 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/281003002/80001
6 years, 7 months ago (2014-05-14 18:26:18 UTC) #16
Ken Russell (switch to Gerrit)
This won't pass the CQ until https://codereview.chromium.org/281193002 lands. Or at least it shouldn't, because linux_gpu_triggered_tests ...
6 years, 7 months ago (2014-05-14 18:48:19 UTC) #17
danakj
On 2014/05/14 18:48:19, Ken Russell wrote: > This won't pass the CQ until https://codereview.chromium.org/281193002 lands. ...
6 years, 7 months ago (2014-05-14 19:29:59 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-14 21:06:07 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-14 21:12:42 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_dbg_simulator/builds/151969) ios_rel_device on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_rel_device/builds/141690)
6 years, 7 months ago (2014-05-14 21:12:42 UTC) #21
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 7 months ago (2014-05-15 14:21:47 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/281003002/80001
6 years, 7 months ago (2014-05-15 14:22:37 UTC) #23
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-15 15:20:27 UTC) #24
danakj
linux_gpu passes now, thanks ken
6 years, 7 months ago (2014-05-15 15:23:27 UTC) #25
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-15 15:24:34 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_dbg_simulator/builds/152326)
6 years, 7 months ago (2014-05-15 15:24:35 UTC) #27
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 7 months ago (2014-05-15 15:29:22 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/281003002/80001
6 years, 7 months ago (2014-05-15 15:31:12 UTC) #29
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 7 months ago (2014-05-15 15:32:54 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/281003002/100001
6 years, 7 months ago (2014-05-15 15:34:03 UTC) #31
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 7 months ago (2014-05-15 15:34:10 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/281003002/120001
6 years, 7 months ago (2014-05-15 15:36:02 UTC) #33
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 7 months ago (2014-05-15 16:13:09 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/281003002/140001
6 years, 7 months ago (2014-05-15 16:14:23 UTC) #35
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-15 17:46:54 UTC) #36
commit-bot: I haz the power
6 years, 7 months ago (2014-05-15 19:36:40 UTC) #37
Message was sent while issue was closed.
Change committed as 270778

Powered by Google App Engine
This is Rietveld 408576698