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

Unified Diff: cc/layers/solid_color_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/solid_color_scrollbar_layer.h ('k') | cc/layers/solid_color_scrollbar_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/solid_color_scrollbar_layer.cc
diff --git a/cc/layers/solid_color_scrollbar_layer.cc b/cc/layers/solid_color_scrollbar_layer.cc
index 196b7e86ab3779d10bf8275fc03a048a1b23e3eb..d9ed922e5d893e9744d23ad38ca2d98f0a91126e 100644
--- a/cc/layers/solid_color_scrollbar_layer.cc
+++ b/cc/layers/solid_color_scrollbar_layer.cc
@@ -12,35 +12,29 @@
scoped_ptr<LayerImpl> SolidColorScrollbarLayer::CreateLayerImpl(
LayerTreeImpl* tree_impl) {
- const bool kIsOverlayScrollbar = true;
return SolidColorScrollbarLayerImpl::Create(
- tree_impl,
- id(),
- orientation(),
- thumb_thickness_,
- is_left_side_vertical_scrollbar_,
- kIsOverlayScrollbar).PassAs<LayerImpl>();
+ tree_impl, id(), orientation(), thumb_thickness_,
+ is_left_side_vertical_scrollbar_).PassAs<LayerImpl>();
}
scoped_refptr<SolidColorScrollbarLayer> SolidColorScrollbarLayer::Create(
ScrollbarOrientation orientation,
int thumb_thickness,
bool is_left_side_vertical_scrollbar,
- Layer* scroll_layer) {
+ int scroll_layer_id) {
return make_scoped_refptr(new SolidColorScrollbarLayer(
orientation,
thumb_thickness,
is_left_side_vertical_scrollbar,
- scroll_layer));
+ scroll_layer_id));
}
SolidColorScrollbarLayer::SolidColorScrollbarLayer(
ScrollbarOrientation orientation,
int thumb_thickness,
bool is_left_side_vertical_scrollbar,
- Layer* scroll_layer)
- : scroll_layer_(scroll_layer),
- clip_layer_(NULL),
+ int scroll_layer_id)
+ : scroll_layer_id_(scroll_layer_id),
orientation_(orientation),
thumb_thickness_(thumb_thickness),
is_left_side_vertical_scrollbar_(is_left_side_vertical_scrollbar) {}
@@ -51,42 +45,19 @@
return this;
}
-void SolidColorScrollbarLayer::PushPropertiesTo(LayerImpl* layer) {
- Layer::PushPropertiesTo(layer);
- PushScrollClipPropertiesTo(layer);
-}
-
-void SolidColorScrollbarLayer::PushScrollClipPropertiesTo(LayerImpl* layer) {
- SolidColorScrollbarLayerImpl* scrollbar_layer =
- static_cast<SolidColorScrollbarLayerImpl*>(layer);
-
- scrollbar_layer->SetScrollLayerById(scroll_layer_ ? scroll_layer_->id()
- : Layer::INVALID_ID);
- scrollbar_layer->SetClipLayerById(clip_layer_ ? clip_layer_->id()
- : Layer::INVALID_ID);
-}
-
bool SolidColorScrollbarLayer::OpacityCanAnimateOnImplThread() const {
return true;
}
int SolidColorScrollbarLayer::ScrollLayerId() const {
- return scroll_layer_->id();
+ return scroll_layer_id_;
}
-void SolidColorScrollbarLayer::SetScrollLayer(scoped_refptr<Layer> layer) {
- if (layer == scroll_layer_)
+void SolidColorScrollbarLayer::SetScrollLayerId(int id) {
+ if (id == scroll_layer_id_)
return;
- scroll_layer_ = layer;
- SetNeedsFullTreeSync();
-}
-
-void SolidColorScrollbarLayer::SetClipLayer(scoped_refptr<Layer> layer) {
- if (layer == clip_layer_)
- return;
-
- clip_layer_ = layer;
+ scroll_layer_id_ = id;
SetNeedsFullTreeSync();
}
« no previous file with comments | « cc/layers/solid_color_scrollbar_layer.h ('k') | cc/layers/solid_color_scrollbar_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698