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

Unified Diff: cc/layers/painted_scrollbar_layer.h

Issue 2816063003: Replace layer id with Element id for tracking scrollbar animation controllers (Closed)
Patch Set: Fix flaky LayerTreeHostImplTestScrollbarOpacity.Android Created 3 years, 8 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/painted_scrollbar_layer.h
diff --git a/cc/layers/painted_scrollbar_layer.h b/cc/layers/painted_scrollbar_layer.h
index 8e1884f44f53671118101b62359ebcd26f49cfb6..28d50e443e16e51906685bec929f6c47f960da3b 100644
--- a/cc/layers/painted_scrollbar_layer.h
+++ b/cc/layers/painted_scrollbar_layer.h
@@ -22,7 +22,8 @@ class CC_EXPORT PaintedScrollbarLayer : public ScrollbarLayerInterface,
static scoped_refptr<PaintedScrollbarLayer> Create(
std::unique_ptr<Scrollbar> scrollbar,
- int scroll_layer_id);
+ int scroll_layer_id,
+ ElementId element_id);
wkorman 2017/04/14 18:17:30 We could add a default '= ElementId()' here and th
pdr. 2017/04/15 06:02:00 This saves many lines in the diff. Done
bool OpacityCanAnimateOnImplThread() const override;
bool AlwaysUseActiveTreeOpacity() const override;
@@ -30,7 +31,8 @@ class CC_EXPORT PaintedScrollbarLayer : public ScrollbarLayerInterface,
// ScrollbarLayerInterface
int ScrollLayerId() const override;
- void SetScrollLayer(int layer_id) override;
+ ElementId ScrollElementId() const override;
+ void SetScrollInfo(int layer_id, ElementId element_id) override;
ScrollbarOrientation orientation() const override;
@@ -45,7 +47,8 @@ class CC_EXPORT PaintedScrollbarLayer : public ScrollbarLayerInterface,
protected:
PaintedScrollbarLayer(std::unique_ptr<Scrollbar> scrollbar,
- int scroll_layer_id);
+ int scroll_layer_id,
+ ElementId scroll_element_id);
~PaintedScrollbarLayer() override;
// For unit tests
@@ -77,6 +80,7 @@ class CC_EXPORT PaintedScrollbarLayer : public ScrollbarLayerInterface,
std::unique_ptr<Scrollbar> scrollbar_;
int scroll_layer_id_;
+ ElementId scroll_element_id_;
float internal_contents_scale_;
gfx::Size internal_content_bounds_;

Powered by Google App Engine
This is Rietveld 408576698