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

Issue 23171014: Fix UpdateTilePriorities viewport in Android WebView. (Closed)

Created:
7 years, 4 months ago by aelias_OOO_until_Jul13
Modified:
7 years, 3 months ago
Reviewers:
danakj, joth, enne (OOO)
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, jam, android-webview-reviews_chromium.org, boliu
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Fix UpdateTilePriorities viewport in Android WebView. This patch fixes the tile management viewport to be the on-screen-visible rect for the last hardware draw. There are two problems I needed to solve: 1) Suppress UpdateTilePriorities from happening when the last draw was a software draw, which is specified by the new "viewport_valid_for_tile_management" bool. 2) In some cases, the clip rect is smaller than the WebView's visible viewport -- for example when the Android Browser progress bar is forcing redraws, the clip is only a small area at the top of the screen. I switched to using the visible viewport for UpdateDrawProperties + glViewport, and introduce a separate "DeviceClip" to override glScissor. (It's necessary to make the change at this level, rather than directly plumbing the visible viewport to UpdateTilePriorities, because UpdateTilePriorities also makes use of outputs from the draw properties calculation.) I also cleaned up all uses of device_viewport_size() to call DrawViewportSize() instead, with the sole exception of UnscaledScrollableViewportSize() which should continue to use the main-thread device_viewport_size_ in all cases (because that's the viewport for scrolling, not drawing). New tests: PictureLayerImplTest.SuppressUpdateTilePriorities, ExternalStencilPixelTest.DeviceClip NOTRY=true BUG=232844 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221321

Patch Set 1 #

Patch Set 2 : Clean up logging #

Patch Set 3 : Fix clipping bug #

Patch Set 4 : Fix more problems with software draw #

Patch Set 5 : Clean up and rebase to 220885 #

Patch Set 6 : Add tests #

Total comments: 12

Patch Set 7 : Code review changes #

Patch Set 8 : Split off new DrawViewportSize() method for non-Renderer uses #

Patch Set 9 : Rebase to 221292 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+348 lines, -91 lines) Patch
M android_webview/browser/in_process_view_renderer.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -2 lines 0 comments Download
M cc/debug/overdraw_metrics.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -7 lines 0 comments Download
M cc/layers/picture_layer_impl.cc View 1 2 3 4 5 6 7 4 chunks +14 lines, -4 lines 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
M cc/output/delegating_renderer_unittest.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M cc/output/direct_renderer.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M cc/output/direct_renderer.cc View 1 2 3 4 5 3 chunks +36 lines, -7 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M cc/output/output_surface.h View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M cc/output/output_surface.cc View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M cc/output/output_surface_client.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M cc/output/renderer.h View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download
M cc/output/renderer_pixeltest.cc View 1 2 3 4 5 1 chunk +25 lines, -0 lines 0 comments Download
M cc/output/software_renderer_unittest.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M cc/test/fake_layer_tree_host_impl.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M cc/test/fake_layer_tree_host_impl.cc View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
M cc/test/fake_output_surface_client.h View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M cc/test/pixel_test.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/pixel_test.cc View 1 2 3 4 5 4 chunks +18 lines, -3 lines 0 comments Download
M cc/test/pixel_test_output_surface.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M cc/test/pixel_test_output_surface.cc View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 chunks +41 lines, -14 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 11 chunks +27 lines, -8 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_impl.h View 1 2 3 4 5 6 7 3 chunks +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 2 3 4 5 6 7 6 chunks +14 lines, -9 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_impl.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/android/in_process/synchronous_compositor_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_output_surface.h View 1 2 3 4 4 chunks +10 lines, -1 line 0 comments Download
M content/browser/android/in_process/synchronous_compositor_output_surface.cc View 1 2 3 4 3 chunks +29 lines, -13 lines 0 comments Download
M content/public/browser/android/synchronous_compositor.h View 1 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
aelias_OOO_until_Jul13
PTAL. This should be the last big externally-managed-viewport related change, I think. This fixes a ...
7 years, 3 months ago (2013-09-03 08:57:23 UTC) #1
tomhudson
The comment on RendererClient::DeviceViewport() seems to be completely wrong? (Or it may just be the ...
7 years, 3 months ago (2013-09-03 10:43:27 UTC) #2
enne (OOO)
https://codereview.chromium.org/23171014/diff/13001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/23171014/diff/13001/cc/layers/picture_layer_impl.cc#newcode296 cc/layers/picture_layer_impl.cc:296: if (!layer_tree_impl()->device_viewport_valid_for_tile_management()) If you're going to early out here, ...
7 years, 3 months ago (2013-09-03 16:58:47 UTC) #3
aelias_OOO_until_Jul13
https://codereview.chromium.org/23171014/diff/13001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/23171014/diff/13001/cc/layers/picture_layer_impl.cc#newcode296 cc/layers/picture_layer_impl.cc:296: if (!layer_tree_impl()->device_viewport_valid_for_tile_management()) On 2013/09/03 16:58:47, enne wrote: > If ...
7 years, 3 months ago (2013-09-03 19:52:09 UTC) #4
enne (OOO)
https://codereview.chromium.org/23171014/diff/13001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/23171014/diff/13001/cc/layers/picture_layer_impl.cc#newcode324 cc/layers/picture_layer_impl.cc:324: gfx::Size device_viewport_size = layer_tree_impl()->DeviceViewport().size(); On 2013/09/03 19:52:09, aelias wrote: ...
7 years, 3 months ago (2013-09-03 21:47:31 UTC) #5
boliu
https://codereview.chromium.org/23171014/diff/13001/cc/output/direct_renderer.cc File cc/output/direct_renderer.cc (right): https://codereview.chromium.org/23171014/diff/13001/cc/output/direct_renderer.cc#newcode270 cc/output/direct_renderer.cc:270: gfx::Rect DirectRenderer::DeviceClipRect(const DrawingFrame* frame) const { On 2013/09/03 21:47:31, ...
7 years, 3 months ago (2013-09-03 21:54:04 UTC) #6
aelias_OOO_until_Jul13
https://codereview.chromium.org/23171014/diff/13001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/23171014/diff/13001/cc/layers/picture_layer_impl.cc#newcode324 cc/layers/picture_layer_impl.cc:324: gfx::Size device_viewport_size = layer_tree_impl()->DeviceViewport().size(); OK, I went with "DrawViewportSize" ...
7 years, 3 months ago (2013-09-04 01:22:22 UTC) #7
enne (OOO)
lgtm. Thanks for the naming and the comments. It's a lot more clear now.
7 years, 3 months ago (2013-09-04 17:20:51 UTC) #8
aelias_OOO_until_Jul13
OK, need joth@ OWNERS for android_webview/ changes.
7 years, 3 months ago (2013-09-04 20:53:29 UTC) #9
joth
lgtm!
7 years, 3 months ago (2013-09-04 21:55:58 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aelias@chromium.org/23171014/38001
7 years, 3 months ago (2013-09-05 00:41:03 UTC) #11
commit-bot: I haz the power
7 years, 3 months ago (2013-09-05 00:43:33 UTC) #12
Message was sent while issue was closed.
Change committed as 221321

Powered by Google App Engine
This is Rietveld 408576698