| 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 // Temporary forwarding header |
| 6 #ifndef ScrollbarLayerChromium_h | 6 #include "cc/scrollbar_layer.h" |
| 7 #define ScrollbarLayerChromium_h | |
| 8 | |
| 9 #if USE(ACCELERATED_COMPOSITING) | |
| 10 | |
| 11 #include "LayerChromium.h" | |
| 12 #include "caching_bitmap_canvas_layer_texture_updater.h" | |
| 13 #include <public/WebScrollbar.h> | |
| 14 #include <public/WebScrollbarThemeGeometry.h> | |
| 15 #include <public/WebScrollbarThemePainter.h> | |
| 16 | |
| 17 namespace cc { | |
| 18 | |
| 19 class Scrollbar; | |
| 20 class ScrollbarThemeComposite; | |
| 21 class CCTextureUpdateQueue; | |
| 22 | |
| 23 class ScrollbarLayerChromium : public LayerChromium { | |
| 24 public: | |
| 25 virtual scoped_ptr<CCLayerImpl> createCCLayerImpl() OVERRIDE; | |
| 26 | |
| 27 static scoped_refptr<ScrollbarLayerChromium> create(PassOwnPtr<WebKit::WebSc
rollbar>, WebKit::WebScrollbarThemePainter, PassOwnPtr<WebKit::WebScrollbarTheme
Geometry>, int scrollLayerId); | |
| 28 | |
| 29 // LayerChromium interface | |
| 30 virtual bool needsContentsScale() const OVERRIDE; | |
| 31 virtual IntSize contentBounds() const OVERRIDE; | |
| 32 virtual void setTexturePriorities(const CCPriorityCalculator&) OVERRIDE; | |
| 33 virtual void update(CCTextureUpdateQueue&, const CCOcclusionTracker*, CCRend
eringStats&) OVERRIDE; | |
| 34 virtual void setLayerTreeHost(CCLayerTreeHost*) OVERRIDE; | |
| 35 virtual void pushPropertiesTo(CCLayerImpl*) OVERRIDE; | |
| 36 | |
| 37 int scrollLayerId() const { return m_scrollLayerId; } | |
| 38 void setScrollLayerId(int id) { m_scrollLayerId = id; } | |
| 39 | |
| 40 virtual ScrollbarLayerChromium* toScrollbarLayerChromium() OVERRIDE; | |
| 41 | |
| 42 protected: | |
| 43 ScrollbarLayerChromium(PassOwnPtr<WebKit::WebScrollbar>, WebKit::WebScrollba
rThemePainter, PassOwnPtr<WebKit::WebScrollbarThemeGeometry>, int scrollLayerId)
; | |
| 44 virtual ~ScrollbarLayerChromium(); | |
| 45 | |
| 46 private: | |
| 47 void updatePart(CachingBitmapCanvasLayerTextureUpdater*, LayerTextureUpdater
::Texture*, const IntRect&, CCTextureUpdateQueue&, CCRenderingStats&); | |
| 48 void createTextureUpdaterIfNeeded(); | |
| 49 | |
| 50 OwnPtr<WebKit::WebScrollbar> m_scrollbar; | |
| 51 WebKit::WebScrollbarThemePainter m_painter; | |
| 52 OwnPtr<WebKit::WebScrollbarThemeGeometry> m_geometry; | |
| 53 int m_scrollLayerId; | |
| 54 | |
| 55 GC3Denum m_textureFormat; | |
| 56 | |
| 57 RefPtr<CachingBitmapCanvasLayerTextureUpdater> m_backTrackUpdater; | |
| 58 RefPtr<CachingBitmapCanvasLayerTextureUpdater> m_foreTrackUpdater; | |
| 59 RefPtr<CachingBitmapCanvasLayerTextureUpdater> m_thumbUpdater; | |
| 60 | |
| 61 // All the parts of the scrollbar except the thumb | |
| 62 OwnPtr<LayerTextureUpdater::Texture> m_backTrack; | |
| 63 OwnPtr<LayerTextureUpdater::Texture> m_foreTrack; | |
| 64 OwnPtr<LayerTextureUpdater::Texture> m_thumb; | |
| 65 }; | |
| 66 | |
| 67 } | |
| 68 #endif // USE(ACCELERATED_COMPOSITING) | |
| 69 | |
| 70 #endif | |
| OLD | NEW |