Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Unified Diff: cc/scrollbar_layer.h

Issue 11122003: [cc] Rename all cc/ filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/scrollbar_geometry_stub.cc ('k') | cc/scrollbar_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scrollbar_layer.h
diff --git a/cc/scrollbar_layer.h b/cc/scrollbar_layer.h
index 638cbb270ce9b24689d5095baf174ade4f4d1a13..5c7cc5c0cd293cda2a54e895e9651a53155bcb2e 100644
--- a/cc/scrollbar_layer.h
+++ b/cc/scrollbar_layer.h
@@ -1,3 +1,70 @@
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+
+
+#ifndef ScrollbarLayerChromium_h
+#define ScrollbarLayerChromium_h
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "LayerChromium.h"
+#include "caching_bitmap_canvas_layer_texture_updater.h"
+#include <public/WebScrollbar.h>
+#include <public/WebScrollbarThemeGeometry.h>
+#include <public/WebScrollbarThemePainter.h>
+
+namespace cc {
+
+class Scrollbar;
+class ScrollbarThemeComposite;
+class CCTextureUpdateQueue;
+
+class ScrollbarLayerChromium : public LayerChromium {
+public:
+ virtual scoped_ptr<CCLayerImpl> createCCLayerImpl() OVERRIDE;
+
+ static scoped_refptr<ScrollbarLayerChromium> create(PassOwnPtr<WebKit::WebScrollbar>, WebKit::WebScrollbarThemePainter, PassOwnPtr<WebKit::WebScrollbarThemeGeometry>, int scrollLayerId);
+
+ // LayerChromium interface
+ virtual bool needsContentsScale() const OVERRIDE;
+ virtual IntSize contentBounds() const OVERRIDE;
+ virtual void setTexturePriorities(const CCPriorityCalculator&) OVERRIDE;
+ virtual void update(CCTextureUpdateQueue&, const CCOcclusionTracker*, CCRenderingStats&) OVERRIDE;
+ virtual void setLayerTreeHost(CCLayerTreeHost*) OVERRIDE;
+ virtual void pushPropertiesTo(CCLayerImpl*) OVERRIDE;
+
+ int scrollLayerId() const { return m_scrollLayerId; }
+ void setScrollLayerId(int id) { m_scrollLayerId = id; }
+
+ virtual ScrollbarLayerChromium* toScrollbarLayerChromium() OVERRIDE;
+
+protected:
+ ScrollbarLayerChromium(PassOwnPtr<WebKit::WebScrollbar>, WebKit::WebScrollbarThemePainter, PassOwnPtr<WebKit::WebScrollbarThemeGeometry>, int scrollLayerId);
+ virtual ~ScrollbarLayerChromium();
+
+private:
+ void updatePart(CachingBitmapCanvasLayerTextureUpdater*, LayerTextureUpdater::Texture*, const IntRect&, CCTextureUpdateQueue&, CCRenderingStats&);
+ void createTextureUpdaterIfNeeded();
+
+ OwnPtr<WebKit::WebScrollbar> m_scrollbar;
+ WebKit::WebScrollbarThemePainter m_painter;
+ OwnPtr<WebKit::WebScrollbarThemeGeometry> m_geometry;
+ int m_scrollLayerId;
+
+ GC3Denum m_textureFormat;
+
+ RefPtr<CachingBitmapCanvasLayerTextureUpdater> m_backTrackUpdater;
+ RefPtr<CachingBitmapCanvasLayerTextureUpdater> m_foreTrackUpdater;
+ RefPtr<CachingBitmapCanvasLayerTextureUpdater> m_thumbUpdater;
+
+ // All the parts of the scrollbar except the thumb
+ OwnPtr<LayerTextureUpdater::Texture> m_backTrack;
+ OwnPtr<LayerTextureUpdater::Texture> m_foreTrack;
+ OwnPtr<LayerTextureUpdater::Texture> m_thumb;
+};
+
+}
+#endif // USE(ACCELERATED_COMPOSITING)
+
+#endif
« no previous file with comments | « cc/scrollbar_geometry_stub.cc ('k') | cc/scrollbar_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698