summaryrefslogtreecommitdiffstats
path: root/cc/test/pixel_test_output_surface.h
diff options
context:
space:
mode:
authoraelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-05 00:43:28 +0000
committeraelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-05 00:43:28 +0000
commit54af0352fb8c3b48b0f379ea1c48006aa1c34615 (patch)
tree8c00bd00f8cde9adbfd90db018205cf2e669d666 /cc/test/pixel_test_output_surface.h
parent576748e8df1fdb8a21958671fe860946f12c82f5 (diff)
downloadchromium_src-54af0352fb8c3b48b0f379ea1c48006aa1c34615.zip
chromium_src-54af0352fb8c3b48b0f379ea1c48006aa1c34615.tar.gz
chromium_src-54af0352fb8c3b48b0f379ea1c48006aa1c34615.tar.bz2
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 Review URL: https://chromiumcodereview.appspot.com/23171014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221321 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/pixel_test_output_surface.h')
-rw-r--r--cc/test/pixel_test_output_surface.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/cc/test/pixel_test_output_surface.h b/cc/test/pixel_test_output_surface.h
index e9052fe..bb6fdfc 100644
--- a/cc/test/pixel_test_output_surface.h
+++ b/cc/test/pixel_test_output_surface.h
@@ -26,10 +26,14 @@ class PixelTestOutputSurface : public OutputSurface {
void set_viewport_offset(gfx::Vector2d viewport_offset) {
viewport_offset_ = viewport_offset;
}
+ void set_device_clip(gfx::Rect device_clip) {
+ device_clip_ = device_clip;
+ }
private:
gfx::Size surface_expansion_size_;
gfx::Vector2d viewport_offset_;
+ gfx::Rect device_clip_;
};
} // namespace cc