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

Unified Diff: cc/layers/painted_scrollbar_layer.cc

Issue 146713002: Revert of Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « cc/layers/painted_scrollbar_layer.h ('k') | cc/layers/painted_scrollbar_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/painted_scrollbar_layer.cc
diff --git a/cc/layers/painted_scrollbar_layer.cc b/cc/layers/painted_scrollbar_layer.cc
index 2a6865089f49f796e522dc43ff6a1de2e77af26f..4466d58a3de7ac579aeb084aa4cd89287b5c7745 100644
--- a/cc/layers/painted_scrollbar_layer.cc
+++ b/cc/layers/painted_scrollbar_layer.cc
@@ -28,17 +28,16 @@
scoped_refptr<PaintedScrollbarLayer> PaintedScrollbarLayer::Create(
scoped_ptr<Scrollbar> scrollbar,
- Layer* scroll_layer) {
+ int scroll_layer_id) {
return make_scoped_refptr(
- new PaintedScrollbarLayer(scrollbar.Pass(), scroll_layer));
+ new PaintedScrollbarLayer(scrollbar.Pass(), scroll_layer_id));
}
PaintedScrollbarLayer::PaintedScrollbarLayer(
scoped_ptr<Scrollbar> scrollbar,
- Layer* scroll_layer)
+ int scroll_layer_id)
: scrollbar_(scrollbar.Pass()),
- scroll_layer_(scroll_layer),
- clip_layer_(NULL),
+ scroll_layer_id_(scroll_layer_id),
thumb_thickness_(scrollbar_->ThumbThickness()),
thumb_length_(scrollbar_->ThumbLength()),
is_overlay_(scrollbar_->IsOverlay()),
@@ -50,22 +49,14 @@
PaintedScrollbarLayer::~PaintedScrollbarLayer() {}
int PaintedScrollbarLayer::ScrollLayerId() const {
- return scroll_layer_->id();
-}
-
-void PaintedScrollbarLayer::SetScrollLayer(scoped_refptr<Layer> layer) {
- if (layer == scroll_layer_)
+ return scroll_layer_id_;
+}
+
+void PaintedScrollbarLayer::SetScrollLayerId(int id) {
+ if (id == scroll_layer_id_)
return;
- scroll_layer_ = layer;
- SetNeedsFullTreeSync();
-}
-
-void PaintedScrollbarLayer::SetClipLayer(scoped_refptr<Layer> layer) {
- if (layer == clip_layer_)
- return;
-
- clip_layer_ = layer;
+ scroll_layer_id_ = id;
SetNeedsFullTreeSync();
}
@@ -118,8 +109,6 @@
void PaintedScrollbarLayer::PushPropertiesTo(LayerImpl* layer) {
ContentsScalingLayer::PushPropertiesTo(layer);
- PushScrollClipPropertiesTo(layer);
-
PaintedScrollbarLayerImpl* scrollbar_layer =
static_cast<PaintedScrollbarLayerImpl*>(layer);
@@ -145,16 +134,6 @@
ScrollbarLayerInterface* PaintedScrollbarLayer::ToScrollbarLayer() {
return this;
-}
-
-void PaintedScrollbarLayer::PushScrollClipPropertiesTo(LayerImpl* layer) {
- PaintedScrollbarLayerImpl* scrollbar_layer =
- static_cast<PaintedScrollbarLayerImpl*>(layer);
-
- scrollbar_layer->SetScrollLayerById(scroll_layer_ ? scroll_layer_->id()
- : Layer::INVALID_ID);
- scrollbar_layer->SetClipLayerById(clip_layer_ ? clip_layer_->id()
- : Layer::INVALID_ID);
}
void PaintedScrollbarLayer::SetLayerTreeHost(LayerTreeHost* host) {
« no previous file with comments | « cc/layers/painted_scrollbar_layer.h ('k') | cc/layers/painted_scrollbar_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698