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" | |
10 #include "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
11 #include "cc/contents_scaling_layer.h" | 10 #include "cc/contents_scaling_layer.h" |
| 11 #include "cc/layer_updater.h" |
12 #include "cc/scrollbar_theme_painter.h" | 12 #include "cc/scrollbar_theme_painter.h" |
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h" | 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h" |
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemeGe
ometry.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemeGe
ometry.h" |
15 | 15 |
16 namespace cc { | 16 namespace cc { |
17 | 17 class CachingBitmapContentLayerUpdater; |
18 class ResourceUpdateQueue; | 18 class ResourceUpdateQueue; |
19 class Scrollbar; | 19 class Scrollbar; |
20 class ScrollbarThemeComposite; | 20 class ScrollbarThemeComposite; |
21 | 21 |
22 class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer { | 22 class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer { |
23 public: | 23 public: |
24 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERR
IDE; | 24 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERR
IDE; |
25 | 25 |
26 static scoped_refptr<ScrollbarLayer> create( | 26 static scoped_refptr<ScrollbarLayer> create( |
27 scoped_ptr<WebKit::WebScrollbar>, | 27 scoped_ptr<WebKit::WebScrollbar>, |
(...skipping 33 matching lines...) Loading... |
61 bool isDirty() const { return !m_dirtyRect.IsEmpty(); } | 61 bool isDirty() const { return !m_dirtyRect.IsEmpty(); } |
62 | 62 |
63 int maxTextureSize(); | 63 int maxTextureSize(); |
64 float clampScaleToMaxTextureSize(float scale); | 64 float clampScaleToMaxTextureSize(float scale); |
65 | 65 |
66 scoped_ptr<WebKit::WebScrollbar> m_scrollbar; | 66 scoped_ptr<WebKit::WebScrollbar> m_scrollbar; |
67 scoped_ptr<ScrollbarThemePainter> m_painter; | 67 scoped_ptr<ScrollbarThemePainter> m_painter; |
68 scoped_ptr<WebKit::WebScrollbarThemeGeometry> m_geometry; | 68 scoped_ptr<WebKit::WebScrollbarThemeGeometry> m_geometry; |
69 int m_scrollLayerId; | 69 int m_scrollLayerId; |
70 | 70 |
71 GLenum m_textureFormat; | 71 unsigned m_textureFormat; |
72 | 72 |
73 gfx::RectF m_dirtyRect; | 73 gfx::RectF m_dirtyRect; |
74 | 74 |
75 scoped_refptr<CachingBitmapContentLayerUpdater> m_backTrackUpdater; | 75 scoped_refptr<CachingBitmapContentLayerUpdater> m_backTrackUpdater; |
76 scoped_refptr<CachingBitmapContentLayerUpdater> m_foreTrackUpdater; | 76 scoped_refptr<CachingBitmapContentLayerUpdater> m_foreTrackUpdater; |
77 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater; | 77 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater; |
78 | 78 |
79 // All the parts of the scrollbar except the thumb | 79 // All the parts of the scrollbar except the thumb |
80 scoped_ptr<LayerUpdater::Resource> m_backTrack; | 80 scoped_ptr<LayerUpdater::Resource> m_backTrack; |
81 scoped_ptr<LayerUpdater::Resource> m_foreTrack; | 81 scoped_ptr<LayerUpdater::Resource> m_foreTrack; |
82 scoped_ptr<LayerUpdater::Resource> m_thumb; | 82 scoped_ptr<LayerUpdater::Resource> m_thumb; |
83 }; | 83 }; |
84 | 84 |
85 } | 85 } |
86 #endif // CC_SCROLLBAR_LAYER_H_ | 86 #endif // CC_SCROLLBAR_LAYER_H_ |
OLD | NEW |