OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 #ifndef CC_SCROLLBAR_LAYER_H_ | 6 #ifndef CC_SCROLLBAR_LAYER_H_ |
7 #define CC_SCROLLBAR_LAYER_H_ | 7 #define CC_SCROLLBAR_LAYER_H_ |
8 | 8 |
9 #include "cc/caching_bitmap_content_layer_updater.h" | 9 #include "cc/caching_bitmap_content_layer_updater.h" |
10 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 static scoped_refptr<ScrollbarLayer> create(scoped_ptr<WebKit::WebScrollbar>
, WebKit::WebScrollbarThemePainter, scoped_ptr<WebKit::WebScrollbarThemeGeometry
>, int scrollLayerId); | 26 static scoped_refptr<ScrollbarLayer> create(scoped_ptr<WebKit::WebScrollbar>
, WebKit::WebScrollbarThemePainter, scoped_ptr<WebKit::WebScrollbarThemeGeometry
>, int scrollLayerId); |
27 | 27 |
28 int scrollLayerId() const { return m_scrollLayerId; } | 28 int scrollLayerId() const { return m_scrollLayerId; } |
29 void setScrollLayerId(int id); | 29 void setScrollLayerId(int id); |
30 | 30 |
31 // Layer interface | 31 // Layer interface |
32 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE; | 32 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE; |
33 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering
Stats&) OVERRIDE; | 33 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering
Stats&) OVERRIDE; |
34 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE; | 34 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE; |
35 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE; | 35 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE; |
36 virtual void setContentsScale(float contentsScale) OVERRIDE; | 36 virtual void setIdealContentsScale(float contentsScale) OVERRIDE; |
37 | 37 |
38 virtual ScrollbarLayer* toScrollbarLayer() OVERRIDE; | 38 virtual ScrollbarLayer* toScrollbarLayer() OVERRIDE; |
39 | 39 |
40 protected: | 40 protected: |
41 ScrollbarLayer(scoped_ptr<WebKit::WebScrollbar>, WebKit::WebScrollbarThemePa
inter, scoped_ptr<WebKit::WebScrollbarThemeGeometry>, int scrollLayerId); | 41 ScrollbarLayer(scoped_ptr<WebKit::WebScrollbar>, WebKit::WebScrollbarThemePa
inter, scoped_ptr<WebKit::WebScrollbarThemeGeometry>, int scrollLayerId); |
42 virtual ~ScrollbarLayer(); | 42 virtual ~ScrollbarLayer(); |
43 | 43 |
44 private: | 44 private: |
45 void updatePart(CachingBitmapContentLayerUpdater*, LayerUpdater::Resource*,
const gfx::Rect&, ResourceUpdateQueue&, RenderingStats&); | 45 void updatePart(CachingBitmapContentLayerUpdater*, LayerUpdater::Resource*,
const gfx::Rect&, ResourceUpdateQueue&, RenderingStats&); |
46 void createUpdaterIfNeeded(); | 46 void createUpdaterIfNeeded(); |
(...skipping 14 matching lines...) Expand all Loading... |
61 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater; | 61 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater; |
62 | 62 |
63 // All the parts of the scrollbar except the thumb | 63 // All the parts of the scrollbar except the thumb |
64 scoped_ptr<LayerUpdater::Resource> m_backTrack; | 64 scoped_ptr<LayerUpdater::Resource> m_backTrack; |
65 scoped_ptr<LayerUpdater::Resource> m_foreTrack; | 65 scoped_ptr<LayerUpdater::Resource> m_foreTrack; |
66 scoped_ptr<LayerUpdater::Resource> m_thumb; | 66 scoped_ptr<LayerUpdater::Resource> m_thumb; |
67 }; | 67 }; |
68 | 68 |
69 } | 69 } |
70 #endif // CC_SCROLLBAR_LAYER_H_ | 70 #endif // CC_SCROLLBAR_LAYER_H_ |
OLD | NEW |