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

Side by Side Diff: cc/scrollbar_layer.h

Issue 11276060: Pass accurate contentsScale to LayerImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "caching_bitmap_content_layer_updater.h" 9 #include "cc/caching_bitmap_content_layer_updater.h"
10 #include "cc/layer.h" 10 #include "cc/contents_scaling_layer.h"
11 #include <public/WebScrollbar.h> 11 #include <public/WebScrollbar.h>
12 #include <public/WebScrollbarThemeGeometry.h> 12 #include <public/WebScrollbarThemeGeometry.h>
13 #include <public/WebScrollbarThemePainter.h> 13 #include <public/WebScrollbarThemePainter.h>
14 14
15 namespace cc { 15 namespace cc {
16 16
17 class ResourceUpdateQueue; 17 class ResourceUpdateQueue;
18 class Scrollbar; 18 class Scrollbar;
19 class ScrollbarThemeComposite; 19 class ScrollbarThemeComposite;
20 20
21 class ScrollbarLayer : public Layer { 21 class ScrollbarLayer : public ContentsScalingLayer {
22 public: 22 public:
23 virtual scoped_ptr<LayerImpl> createLayerImpl() OVERRIDE; 23 virtual scoped_ptr<LayerImpl> createLayerImpl() OVERRIDE;
24 24
25 static scoped_refptr<ScrollbarLayer> create(scoped_ptr<WebKit::WebScrollbar> , WebKit::WebScrollbarThemePainter, scoped_ptr<WebKit::WebScrollbarThemeGeometry >, int scrollLayerId); 25 static scoped_refptr<ScrollbarLayer> create(scoped_ptr<WebKit::WebScrollbar> , WebKit::WebScrollbarThemePainter, scoped_ptr<WebKit::WebScrollbarThemeGeometry >, int scrollLayerId);
26 26
27 // Layer interface 27 // Layer interface
28 virtual bool needsContentsScale() const OVERRIDE;
29 virtual IntSize contentBounds() const OVERRIDE;
30 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE; 28 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE;
31 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats&) OVERRIDE; 29 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats&) OVERRIDE;
32 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE; 30 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE;
33 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE; 31 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE;
34 32
35 int scrollLayerId() const { return m_scrollLayerId; } 33 int scrollLayerId() const { return m_scrollLayerId; }
36 void setScrollLayerId(int id) { m_scrollLayerId = id; } 34 void setScrollLayerId(int id) { m_scrollLayerId = id; }
37 35
38 virtual ScrollbarLayer* toScrollbarLayer() OVERRIDE; 36 virtual ScrollbarLayer* toScrollbarLayer() OVERRIDE;
39 37
(...skipping 17 matching lines...) Expand all
57 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater; 55 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater;
58 56
59 // All the parts of the scrollbar except the thumb 57 // All the parts of the scrollbar except the thumb
60 scoped_ptr<LayerUpdater::Resource> m_backTrack; 58 scoped_ptr<LayerUpdater::Resource> m_backTrack;
61 scoped_ptr<LayerUpdater::Resource> m_foreTrack; 59 scoped_ptr<LayerUpdater::Resource> m_foreTrack;
62 scoped_ptr<LayerUpdater::Resource> m_thumb; 60 scoped_ptr<LayerUpdater::Resource> m_thumb;
63 }; 61 };
64 62
65 } 63 }
66 #endif 64 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698