diff options
author | aelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-01 23:42:44 +0000 |
---|---|---|
committer | aelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-01 23:42:44 +0000 |
commit | 60d47acb4b8835090cf37a7b84302710f461eeb7 (patch) | |
tree | 5cb6c917816f0f5165946f385ba45738d277b0cf /content/port | |
parent | 8e93668ff0e6c68f9bc665763f8a589372e7437b (diff) | |
download | chromium_src-60d47acb4b8835090cf37a7b84302710f461eeb7.zip chromium_src-60d47acb4b8835090cf37a7b84302710f461eeb7.tar.gz chromium_src-60d47acb4b8835090cf37a7b84302710f461eeb7.tar.bz2 |
Plumb physical backing size from RWHV to renderer CC.
This patch introduces a concept of "physical backing size" which is plumbed
down from port-specific browser code to the renderer compositor.
This is distinct from the usual concept of view size on high-DPI screens
with >1 dpi scale. Physical backing size represents the size of the
texture CC draws to, whereas the view size is given to WebKit and
specifies the CSS width/height.
Before this patch, physical backing size was recalculated in the
renderer by multiplying the view size by DPI scale. There are two problems
with this:
- This introduces off-by-one errors when DPI scale is non-integral.
Values such as 1.5 and 1.33125 are common on Android devices.
- The Android port would like to more efficiently implement features like
on-screen-keyboard bringup and URL-bar hiding without needing to
resize the backing texture. Separating the value given to CC and to
WebKit is the first step towards this.
WebKit counterpart at https://bugs.webkit.org/show_bug.cgi?id=110727
NOTRY=true
BUG=152502
Review URL: https://chromiumcodereview.appspot.com/12328080
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/port')
-rw-r--r-- | content/port/browser/render_widget_host_view_port.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/content/port/browser/render_widget_host_view_port.h b/content/port/browser/render_widget_host_view_port.h index 52699be..05470af 100644 --- a/content/port/browser/render_widget_host_view_port.h +++ b/content/port/browser/render_widget_host_view_port.h @@ -229,6 +229,9 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView, virtual void GetScreenInfo(WebKit::WebScreenInfo* results) = 0; + // The size of the view's backing surface in non-DPI-adjusted pixels. + virtual gfx::Size GetPhysicalBackingSize() const = 0; + // Gets the bounds of the window, in screen coordinates. virtual gfx::Rect GetBoundsInRootWindow() = 0; |