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

Unified Diff: cc/layers/layer.h

Issue 23983047: Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use layer ids instead of pointers for registering scroll/clip layers. Created 6 years, 11 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/layers/layer.h
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index df358f2bf999a6338e49308ada1bbcfcfe94e732..033fbeca1a88944acdfb58cfc91a4dbb896febdb 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -269,11 +269,10 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
gfx::Vector2d scroll_offset() const { return scroll_offset_; }
void SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset);
- void SetMaxScrollOffset(gfx::Vector2d max_scroll_offset);
- gfx::Vector2d max_scroll_offset() const { return max_scroll_offset_; }
+ gfx::Vector2d MaxScrollOffset() const;
- void SetScrollable(bool scrollable);
- bool scrollable() const { return scrollable_; }
+ void SetScrollClipLayerId(int clip_layer_id);
+ bool scrollable() const { return scroll_clip_layer_id_ != INVALID_ID; }
void SetUserScrollable(bool horizontal, bool vertical);
bool user_scrollable_horizontal() const {
@@ -565,7 +564,10 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
gfx::Size bounds_;
gfx::Vector2d scroll_offset_;
- gfx::Vector2d max_scroll_offset_;
+ // This variable indicates which ancestor layer (if any) whose size,
+ // transformed relative to this layer, defines the maximum scroll offset for
+ // this layer.
+ int scroll_clip_layer_id_;
bool scrollable_ : 1;
bool should_scroll_on_main_thread_ : 1;
bool have_wheel_event_handlers_ : 1;

Powered by Google App Engine
This is Rietveld 408576698