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

Unified Diff: cc/layers/scrollbar_layer.h

Issue 18341009: Refactor cc scrollbar layers to separate solid-color vs desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased patch as it's sat for a while. Created 7 years, 4 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/scrollbar_layer.h
diff --git a/cc/layers/scrollbar_layer.h b/cc/layers/scrollbar_layer.h
index f500dcc66d277dd8d46e0e835239fb844e367a5f..8f27198fcb9dfbb2828a168c530f6986afe12642 100644
--- a/cc/layers/scrollbar_layer.h
+++ b/cc/layers/scrollbar_layer.h
@@ -8,6 +8,7 @@
#include "cc/base/cc_export.h"
#include "cc/input/scrollbar.h"
#include "cc/layers/contents_scaling_layer.h"
+#include "cc/layers/scrollbar_layer_base.h"
#include "cc/layers/scrollbar_theme_painter.h"
#include "cc/resources/layer_updater.h"
@@ -16,7 +17,8 @@ class CachingBitmapContentLayerUpdater;
class ResourceUpdateQueue;
class ScrollbarThemeComposite;
-class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer {
+class CC_EXPORT ScrollbarLayer : public ScrollbarLayerBase,
+ public ContentsScalingLayer {
public:
virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
OVERRIDE;
@@ -25,12 +27,9 @@ class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer {
scoped_ptr<Scrollbar> scrollbar,
int scroll_layer_id);
- int scroll_layer_id() const { return scroll_layer_id_; }
- void SetScrollLayerId(int id);
-
virtual bool OpacityCanAnimateOnImplThread() const OVERRIDE;
-
- ScrollbarOrientation Orientation() const;
+ virtual ScrollbarLayerBase* ToScrollbarLayerBase() OVERRIDE;
+ virtual void SetScrollLayerId(int id) OVERRIDE;
// Layer interface
virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
@@ -47,8 +46,6 @@ class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer {
float* contents_scale_y,
gfx::Size* content_bounds) OVERRIDE;
- virtual ScrollbarLayer* ToScrollbarLayer() OVERRIDE;
-
protected:
ScrollbarLayer(scoped_ptr<Scrollbar> scrollbar,
int scroll_layer_id);
@@ -73,7 +70,6 @@ class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer {
int thumb_thickness_;
int thumb_length_;
gfx::Rect track_rect_;
- int scroll_layer_id_;
unsigned texture_format_;

Powered by Google App Engine
This is Rietveld 408576698