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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 15579002: Implement transform/clip support for Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add tests Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 02c0a908d8a28deb42078c9c2ae40a14a18f1eee..22d69022ee4c31148fec19588fc85c774bf962ab 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -180,8 +180,8 @@ class CC_EXPORT LayerTreeHostImpl
gfx::SizeF VisibleViewportSize() const;
// RendererClient implementation
+ virtual gfx::Rect DeviceViewport() const OVERRIDE;
private:
- virtual gfx::Size DeviceViewportSize() const OVERRIDE;
virtual float DeviceScaleFactor() const OVERRIDE;
virtual const LayerTreeSettings& Settings() const OVERRIDE;
public:
@@ -211,6 +211,8 @@ class CC_EXPORT LayerTreeHostImpl
OVERRIDE;
virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack)
OVERRIDE;
+ virtual void SetExternalDrawConstraints(const gfx::Transform& transform,
+ gfx::Rect viewport) OVERRIDE;
// Called from LayerTreeImpl.
void OnCanDrawStateChangedForTree();
@@ -271,6 +273,9 @@ class CC_EXPORT LayerTreeHostImpl
void SetDeviceScaleFactor(float device_scale_factor);
float device_scale_factor() const { return device_scale_factor_; }
+ gfx::Rect DeviceClip() const;
+ const gfx::Transform& DeviceTransform() const;
+
scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas();
bool needs_animate_layers() const {
@@ -462,9 +467,6 @@ class CC_EXPORT LayerTreeHostImpl
LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_;
LayerTreeSettings settings_;
LayerTreeDebugState debug_state_;
- gfx::Size device_viewport_size_;
- float overdraw_bottom_height_;
- float device_scale_factor_;
bool visible_;
ManagedMemoryPolicy managed_memory_policy_;
@@ -498,6 +500,26 @@ class CC_EXPORT LayerTreeHostImpl
size_t last_sent_memory_visible_and_nearby_bytes_;
size_t last_sent_memory_use_bytes_;
+ // Viewport size passed in from the main thread, in physical pixels.
+ gfx::Size device_viewport_size_;
+
+ // Conversion factor from CSS pixels to physical pixels when
+ // pageScaleFactor=1.
+ float device_scale_factor_;
+
+ // Vertical amount of the viewport size that's known to covered by a
+ // browser-side UI element, such as an on-screen-keyboard. This affects
+ // scrollable size since we want to still be able to scroll to the bottom of
+ // the page when the keyboard is up.
+ float overdraw_bottom_height_;
+
+ // Optional top-level constraints that can be set by the OutputSurface. The
+ // external_viewport_'s size takes precedence over device_viewport_size_ for
+ // DrawQuad generation and Renderer; however, device_viewport_size_ is still
+ // used for scrollable size.
+ gfx::Transform external_transform_;
+ gfx::Rect external_viewport_;
+
gfx::Rect viewport_damage_rect_;
base::TimeTicks current_frame_timeticks_;

Powered by Google App Engine
This is Rietveld 408576698