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

Side by Side Diff: cc/scrollbar_layer.h

Issue 11503005: cc: Refactor content scale/bounds into draw properties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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
« no previous file with comments | « cc/layer_tree_host_unittest.cc ('k') | cc/scrollbar_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 15 matching lines...) Expand all
26 static scoped_refptr<ScrollbarLayer> create(scoped_ptr<WebKit::WebScrollbar> , WebKit::WebScrollbarThemePainter, scoped_ptr<WebKit::WebScrollbarThemeGeometry >, int scrollLayerId); 26 static scoped_refptr<ScrollbarLayer> create(scoped_ptr<WebKit::WebScrollbar> , WebKit::WebScrollbarThemePainter, scoped_ptr<WebKit::WebScrollbarThemeGeometry >, int scrollLayerId);
27 27
28 int scrollLayerId() const { return m_scrollLayerId; } 28 int scrollLayerId() const { return m_scrollLayerId; }
29 void setScrollLayerId(int id); 29 void setScrollLayerId(int id);
30 30
31 // Layer interface 31 // Layer interface
32 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE; 32 virtual void setTexturePriorities(const PriorityCalculator&) OVERRIDE;
33 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats&) OVERRIDE; 33 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering Stats&) OVERRIDE;
34 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE; 34 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE;
35 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE; 35 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE;
36 virtual void setContentsScale(float contentsScale) OVERRIDE; 36 virtual void calculateContentsScale(
37 float idealContentsScale,
38 float* contentsScaleX,
39 float* contentsScaleY,
40 gfx::Size* contentBounds) OVERRIDE;
37 41
38 virtual ScrollbarLayer* toScrollbarLayer() OVERRIDE; 42 virtual ScrollbarLayer* toScrollbarLayer() OVERRIDE;
39 43
40 protected: 44 protected:
41 ScrollbarLayer(scoped_ptr<WebKit::WebScrollbar>, WebKit::WebScrollbarThemePa inter, scoped_ptr<WebKit::WebScrollbarThemeGeometry>, int scrollLayerId); 45 ScrollbarLayer(scoped_ptr<WebKit::WebScrollbar>, WebKit::WebScrollbarThemePa inter, scoped_ptr<WebKit::WebScrollbarThemeGeometry>, int scrollLayerId);
42 virtual ~ScrollbarLayer(); 46 virtual ~ScrollbarLayer();
43 47
44 private: 48 private:
45 void updatePart(CachingBitmapContentLayerUpdater*, LayerUpdater::Resource*, const gfx::Rect&, ResourceUpdateQueue&, RenderingStats&); 49 void updatePart(CachingBitmapContentLayerUpdater*, LayerUpdater::Resource*, const gfx::Rect&, ResourceUpdateQueue&, RenderingStats&);
46 void createUpdaterIfNeeded(); 50 void createUpdaterIfNeeded();
(...skipping 14 matching lines...) Expand all
61 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater; 65 scoped_refptr<CachingBitmapContentLayerUpdater> m_thumbUpdater;
62 66
63 // All the parts of the scrollbar except the thumb 67 // All the parts of the scrollbar except the thumb
64 scoped_ptr<LayerUpdater::Resource> m_backTrack; 68 scoped_ptr<LayerUpdater::Resource> m_backTrack;
65 scoped_ptr<LayerUpdater::Resource> m_foreTrack; 69 scoped_ptr<LayerUpdater::Resource> m_foreTrack;
66 scoped_ptr<LayerUpdater::Resource> m_thumb; 70 scoped_ptr<LayerUpdater::Resource> m_thumb;
67 }; 71 };
68 72
69 } 73 }
70 #endif // CC_SCROLLBAR_LAYER_H_ 74 #endif // CC_SCROLLBAR_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layer_tree_host_unittest.cc ('k') | cc/scrollbar_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698