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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 scoped_ptr<ScrollbarThemePainter>, | 51 scoped_ptr<ScrollbarThemePainter>, |
52 scoped_ptr<WebKit::WebScrollbarThemeGeometry>, | 52 scoped_ptr<WebKit::WebScrollbarThemeGeometry>, |
53 int scrollLayerId); | 53 int scrollLayerId); |
54 virtual ~ScrollbarLayer(); | 54 virtual ~ScrollbarLayer(); |
55 | 55 |
56 private: | 56 private: |
57 void updatePart(CachingBitmapContentLayerUpdater*, LayerUpdater::Resource*,
const gfx::Rect&, ResourceUpdateQueue&, RenderingStats&); | 57 void updatePart(CachingBitmapContentLayerUpdater*, LayerUpdater::Resource*,
const gfx::Rect&, ResourceUpdateQueue&, RenderingStats&); |
58 void createUpdaterIfNeeded(); | 58 void createUpdaterIfNeeded(); |
59 gfx::Rect scrollbarLayerRectToContentRect(const gfx::Rect& layerRect) const; | 59 gfx::Rect scrollbarLayerRectToContentRect(const gfx::Rect& layerRect) const; |
60 | 60 |
| 61 bool isDirty() const { return !m_dirtyRect.IsEmpty(); } |
| 62 |
61 int maxTextureSize(); | 63 int maxTextureSize(); |
62 float clampScaleToMaxTextureSize(float scale); | 64 float clampScaleToMaxTextureSize(float scale); |
63 | 65 |
64 scoped_ptr<WebKit::WebScrollbar> m_scrollbar; | 66 scoped_ptr<WebKit::WebScrollbar> m_scrollbar; |
65 scoped_ptr<ScrollbarThemePainter> m_painter; | 67 scoped_ptr<ScrollbarThemePainter> m_painter; |
66 scoped_ptr<WebKit::WebScrollbarThemeGeometry> m_geometry; | 68 scoped_ptr<WebKit::WebScrollbarThemeGeometry> m_geometry; |
67 int m_scrollLayerId; | 69 int m_scrollLayerId; |
68 | 70 |
69 GLenum m_textureFormat; | 71 GLenum m_textureFormat; |
70 | 72 |
| 73 gfx::RectF m_dirtyRect; |
| 74 |
71 scoped_refptr<CachingBitmapContentLayerUpdater> m_backTrackUpdater; | 75 scoped_refptr<CachingBitmapContentLayerUpdater> m_backTrackUpdater; |
72 scoped_refptr<CachingBitmapContentLayerUpdater> m_foreTrackUpdater; | 76 scoped_refptr<CachingBitmapContentLayerUpdater> m_foreTrackUpdater; |
73 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater; | 77 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater; |
74 | 78 |
75 // All the parts of the scrollbar except the thumb | 79 // All the parts of the scrollbar except the thumb |
76 scoped_ptr<LayerUpdater::Resource> m_backTrack; | 80 scoped_ptr<LayerUpdater::Resource> m_backTrack; |
77 scoped_ptr<LayerUpdater::Resource> m_foreTrack; | 81 scoped_ptr<LayerUpdater::Resource> m_foreTrack; |
78 scoped_ptr<LayerUpdater::Resource> m_thumb; | 82 scoped_ptr<LayerUpdater::Resource> m_thumb; |
79 }; | 83 }; |
80 | 84 |
81 } | 85 } |
82 #endif // CC_SCROLLBAR_LAYER_H_ | 86 #endif // CC_SCROLLBAR_LAYER_H_ |
OLD | NEW |