summaryrefslogtreecommitdiffstats
path: root/cc/output/output_surface.h
diff options
context:
space:
mode:
authoraelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-06 23:23:32 +0000
committeraelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-06 23:23:32 +0000
commitf224cc9a660a41bf5115fb2db7564cd0c87d68b5 (patch)
tree367cecabdd2f47685b214c92833567a44140ba99 /cc/output/output_surface.h
parent2ed80f0145fc03eb7eac6333b11eb27645bb37ea (diff)
downloadchromium_src-f224cc9a660a41bf5115fb2db7564cd0c87d68b5.zip
chromium_src-f224cc9a660a41bf5115fb2db7564cd0c87d68b5.tar.gz
chromium_src-f224cc9a660a41bf5115fb2db7564cd0c87d68b5.tar.bz2
Implement transform/clip support for Android WebView.
Transforms are applied above the root-layer. I fixed LTHCommon to forward root-layer transforms to sublayers, as the RenderSurface-based logic was previously clearing transforms and copying over only the scale portion. The clip rect is treated as the viewport for the purposes of DrawQuads and Renderer (this is required to avoid awful performance when the WebView is much larger than the screen). Because y-flipping the clip rect depends on knowledge of the true surface size, I also needed to add a new OutputSurface::SurfaceSize() getter and refactored viewport size throughout the Renderers to separate render-pass draw rect, glViewport rect, and surface size. Scale and translate transforms work with this patch, but rotation is still broken. New tests: LayerTreeHostCommonTest.TransformAboveRootLayer, GLRendererTest2.ScissorAndViewportWithinNonreshapableSurface, RendererPixelTest/2* and 3* NOTRY=true BUG=230463 Review URL: https://chromiumcodereview.appspot.com/15579002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/output_surface.h')
-rw-r--r--cc/output/output_surface.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index d6f4b82..00877de 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -89,6 +89,7 @@ class CC_EXPORT OutputSurface {
virtual void DiscardBackbuffer();
virtual void Reshape(gfx::Size size, float scale_factor);
+ virtual gfx::Size SurfaceSize() const;
virtual void BindFramebuffer();
@@ -110,6 +111,8 @@ class CC_EXPORT OutputSurface {
scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
scoped_ptr<cc::SoftwareOutputDevice> software_device_;
bool has_gl_discard_backbuffer_;
+ gfx::Size surface_size_;
+ float device_scale_factor_;
scoped_ptr<OutputSurfaceCallbacks> callbacks_;