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 ScrollbarLayerChromium_h | 6 #ifndef ScrollbarLayerChromium_h |
7 #define ScrollbarLayerChromium_h | 7 #define ScrollbarLayerChromium_h |
8 | 8 |
9 #if USE(ACCELERATED_COMPOSITING) | 9 #if USE(ACCELERATED_COMPOSITING) |
10 | 10 |
11 #include "LayerChromium.h" | 11 #include "LayerChromium.h" |
12 #include "LayerTextureUpdater.h" | 12 #include "caching_bitmap_canvas_layer_texture_updater.h" |
13 #include <public/WebScrollbar.h> | 13 #include <public/WebScrollbar.h> |
14 #include <public/WebScrollbarThemeGeometry.h> | 14 #include <public/WebScrollbarThemeGeometry.h> |
15 #include <public/WebScrollbarThemePainter.h> | 15 #include <public/WebScrollbarThemePainter.h> |
16 | 16 |
17 namespace cc { | 17 namespace cc { |
18 | 18 |
19 class Scrollbar; | 19 class Scrollbar; |
20 class ScrollbarThemeComposite; | 20 class ScrollbarThemeComposite; |
21 class CCTextureUpdateQueue; | 21 class CCTextureUpdateQueue; |
22 | 22 |
(...skipping 15 matching lines...) Expand all Loading... |
38 | 38 |
39 int scrollLayerId() const { return m_scrollLayerId; } | 39 int scrollLayerId() const { return m_scrollLayerId; } |
40 void setScrollLayerId(int id) { m_scrollLayerId = id; } | 40 void setScrollLayerId(int id) { m_scrollLayerId = id; } |
41 | 41 |
42 virtual ScrollbarLayerChromium* toScrollbarLayerChromium() OVERRIDE; | 42 virtual ScrollbarLayerChromium* toScrollbarLayerChromium() OVERRIDE; |
43 | 43 |
44 protected: | 44 protected: |
45 ScrollbarLayerChromium(PassOwnPtr<WebKit::WebScrollbar>, WebKit::WebScrollba
rThemePainter, PassOwnPtr<WebKit::WebScrollbarThemeGeometry>, int scrollLayerId)
; | 45 ScrollbarLayerChromium(PassOwnPtr<WebKit::WebScrollbar>, WebKit::WebScrollba
rThemePainter, PassOwnPtr<WebKit::WebScrollbarThemeGeometry>, int scrollLayerId)
; |
46 | 46 |
47 private: | 47 private: |
48 void updatePart(LayerTextureUpdater*, LayerTextureUpdater::Texture*, const I
ntRect&, CCTextureUpdateQueue&, CCRenderingStats&); | 48 void updatePart(CachingBitmapCanvasLayerTextureUpdater*, LayerTextureUpdater
::Texture*, const IntRect&, CCTextureUpdateQueue&, CCRenderingStats&); |
49 void createTextureUpdaterIfNeeded(); | 49 void createTextureUpdaterIfNeeded(); |
50 | 50 |
51 OwnPtr<WebKit::WebScrollbar> m_scrollbar; | 51 OwnPtr<WebKit::WebScrollbar> m_scrollbar; |
52 WebKit::WebScrollbarThemePainter m_painter; | 52 WebKit::WebScrollbarThemePainter m_painter; |
53 OwnPtr<WebKit::WebScrollbarThemeGeometry> m_geometry; | 53 OwnPtr<WebKit::WebScrollbarThemeGeometry> m_geometry; |
54 int m_scrollLayerId; | 54 int m_scrollLayerId; |
55 | 55 |
56 GC3Denum m_textureFormat; | 56 GC3Denum m_textureFormat; |
57 | 57 |
58 RefPtr<LayerTextureUpdater> m_backTrackUpdater; | 58 RefPtr<CachingBitmapCanvasLayerTextureUpdater> m_backTrackUpdater; |
59 RefPtr<LayerTextureUpdater> m_foreTrackUpdater; | 59 RefPtr<CachingBitmapCanvasLayerTextureUpdater> m_foreTrackUpdater; |
60 RefPtr<LayerTextureUpdater> m_thumbUpdater; | 60 RefPtr<CachingBitmapCanvasLayerTextureUpdater> m_thumbUpdater; |
61 | 61 |
62 // All the parts of the scrollbar except the thumb | 62 // All the parts of the scrollbar except the thumb |
63 OwnPtr<LayerTextureUpdater::Texture> m_backTrack; | 63 OwnPtr<LayerTextureUpdater::Texture> m_backTrack; |
64 OwnPtr<LayerTextureUpdater::Texture> m_foreTrack; | 64 OwnPtr<LayerTextureUpdater::Texture> m_foreTrack; |
65 OwnPtr<LayerTextureUpdater::Texture> m_thumb; | 65 OwnPtr<LayerTextureUpdater::Texture> m_thumb; |
66 }; | 66 }; |
67 | 67 |
68 } | 68 } |
69 #endif // USE(ACCELERATED_COMPOSITING) | 69 #endif // USE(ACCELERATED_COMPOSITING) |
70 | 70 |
71 #endif | 71 #endif |
OLD | NEW |