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

Unified Diff: cc/trees/layer_tree_host_common.h

Issue 2144303002: Made layout viewport scroll updates from compositor work like ordinary layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rootScrollerOnCompositor
Patch Set: Initialize ScrollUpdateInfo's layer id in constructor Created 4 years, 5 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
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common.h
diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h
index 00ef692bcf179555479a2ba46d2c5cc1372380c5..e50a51410e2b29c66cf960515abd2a9ede3c98fc 100644
--- a/cc/trees/layer_tree_host_common.h
+++ b/cc/trees/layer_tree_host_common.h
@@ -136,6 +136,8 @@ class CC_EXPORT LayerTreeHostCommon {
// franctional scroll offset.
gfx::Vector2d scroll_delta;
+ ScrollUpdateInfo();
+
bool operator==(const ScrollUpdateInfo& other) const;
void ToProtobuf(proto::ScrollUpdateInfo* proto) const;
@@ -147,6 +149,12 @@ struct CC_EXPORT ScrollAndScaleSet {
ScrollAndScaleSet();
~ScrollAndScaleSet();
+ // The inner viewport scroll delta is kept separate since it's special.
+ // Because the inner (visual) viewport's maximum offset depends on the
+ // current page scale, the two must be committed at the same time to prevent
+ // clamping.
+ LayerTreeHostCommon::ScrollUpdateInfo inner_viewport_scroll;
+
std::vector<LayerTreeHostCommon::ScrollUpdateInfo> scrolls;
float page_scale_delta;
gfx::Vector2dF elastic_overscroll_delta;
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698