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

Side by Side Diff: cc/layers/scrollbar_layer.h

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 190965 Created 7 years, 8 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 unified diff | Download patch
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/layers/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 #ifndef CC_LAYERS_SCROLLBAR_LAYER_H_ 5 #ifndef CC_LAYERS_SCROLLBAR_LAYER_H_
6 #define CC_LAYERS_SCROLLBAR_LAYER_H_ 6 #define CC_LAYERS_SCROLLBAR_LAYER_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/layers/contents_scaling_layer.h" 9 #include "cc/layers/contents_scaling_layer.h"
10 #include "cc/layers/scrollbar_theme_painter.h" 10 #include "cc/layers/scrollbar_theme_painter.h"
(...skipping 22 matching lines...) Expand all
33 void SetScrollLayerId(int id); 33 void SetScrollLayerId(int id);
34 34
35 virtual bool OpacityCanAnimateOnImplThread() const OVERRIDE; 35 virtual bool OpacityCanAnimateOnImplThread() const OVERRIDE;
36 36
37 WebKit::WebScrollbar::Orientation Orientation() const; 37 WebKit::WebScrollbar::Orientation Orientation() const;
38 38
39 // Layer interface 39 // Layer interface
40 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) 40 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
41 OVERRIDE; 41 OVERRIDE;
42 virtual void Update(ResourceUpdateQueue* queue, 42 virtual void Update(ResourceUpdateQueue* queue,
43 const OcclusionTracker* occlusion, 43 const OcclusionTracker* occlusion) OVERRIDE;
44 RenderingStats* stats) OVERRIDE;
45 virtual void SetLayerTreeHost(LayerTreeHost* host) OVERRIDE; 44 virtual void SetLayerTreeHost(LayerTreeHost* host) OVERRIDE;
46 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; 45 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
47 virtual void CalculateContentsScale(float ideal_contents_scale, 46 virtual void CalculateContentsScale(float ideal_contents_scale,
48 bool animating_transform_to_screen, 47 bool animating_transform_to_screen,
49 float* contents_scale_x, 48 float* contents_scale_x,
50 float* contents_scale_y, 49 float* contents_scale_y,
51 gfx::Size* content_bounds) OVERRIDE; 50 gfx::Size* content_bounds) OVERRIDE;
52 51
53 virtual ScrollbarLayer* ToScrollbarLayer() OVERRIDE; 52 virtual ScrollbarLayer* ToScrollbarLayer() OVERRIDE;
54 53
55 protected: 54 protected:
56 ScrollbarLayer( 55 ScrollbarLayer(
57 scoped_ptr<WebKit::WebScrollbar> scrollbar, 56 scoped_ptr<WebKit::WebScrollbar> scrollbar,
58 scoped_ptr<ScrollbarThemePainter> painter, 57 scoped_ptr<ScrollbarThemePainter> painter,
59 scoped_ptr<WebKit::WebScrollbarThemeGeometry> geometry, 58 scoped_ptr<WebKit::WebScrollbarThemeGeometry> geometry,
60 int scroll_layer_id); 59 int scroll_layer_id);
61 virtual ~ScrollbarLayer(); 60 virtual ~ScrollbarLayer();
62 61
63 private: 62 private:
64 void UpdatePart(CachingBitmapContentLayerUpdater* painter, 63 void UpdatePart(CachingBitmapContentLayerUpdater* painter,
65 LayerUpdater::Resource* resource, 64 LayerUpdater::Resource* resource,
66 gfx::Rect rect, 65 gfx::Rect rect,
67 ResourceUpdateQueue* queue, 66 ResourceUpdateQueue* queue);
68 RenderingStats* stats);
69 void CreateUpdaterIfNeeded(); 67 void CreateUpdaterIfNeeded();
70 gfx::Rect ScrollbarLayerRectToContentRect(gfx::Rect layer_rect) const; 68 gfx::Rect ScrollbarLayerRectToContentRect(gfx::Rect layer_rect) const;
71 69
72 bool is_dirty() const { return !dirty_rect_.IsEmpty(); } 70 bool is_dirty() const { return !dirty_rect_.IsEmpty(); }
73 71
74 int MaxTextureSize(); 72 int MaxTextureSize();
75 float ClampScaleToMaxTextureSize(float scale); 73 float ClampScaleToMaxTextureSize(float scale);
76 74
77 scoped_ptr<WebKit::WebScrollbar> scrollbar_; 75 scoped_ptr<WebKit::WebScrollbar> scrollbar_;
78 scoped_ptr<ScrollbarThemePainter> painter_; 76 scoped_ptr<ScrollbarThemePainter> painter_;
(...skipping 11 matching lines...) Expand all
90 88
91 // All the parts of the scrollbar except the thumb 89 // All the parts of the scrollbar except the thumb
92 scoped_ptr<LayerUpdater::Resource> back_track_; 90 scoped_ptr<LayerUpdater::Resource> back_track_;
93 scoped_ptr<LayerUpdater::Resource> fore_track_; 91 scoped_ptr<LayerUpdater::Resource> fore_track_;
94 scoped_ptr<LayerUpdater::Resource> thumb_; 92 scoped_ptr<LayerUpdater::Resource> thumb_;
95 }; 93 };
96 94
97 } // namespace cc 95 } // namespace cc
98 96
99 #endif // CC_LAYERS_SCROLLBAR_LAYER_H_ 97 #endif // CC_LAYERS_SCROLLBAR_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/layers/scrollbar_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698