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

Side by Side Diff: cc/layers/tiled_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, 9 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/texture_layer.cc ('k') | cc/layers/tiled_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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_TILED_LAYER_H_ 5 #ifndef CC_LAYERS_TILED_LAYER_H_
6 #define CC_LAYERS_TILED_LAYER_H_ 6 #define CC_LAYERS_TILED_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/resources/layer_tiling_data.h" 10 #include "cc/resources/layer_tiling_data.h"
(...skipping 16 matching lines...) Expand all
27 virtual void SetIsMask(bool is_mask) OVERRIDE; 27 virtual void SetIsMask(bool is_mask) OVERRIDE;
28 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; 28 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
29 virtual bool BlocksPendingCommit() const OVERRIDE; 29 virtual bool BlocksPendingCommit() const OVERRIDE;
30 virtual bool DrawsContent() const OVERRIDE; 30 virtual bool DrawsContent() const OVERRIDE;
31 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE; 31 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect) OVERRIDE;
32 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE; 32 virtual void SetLayerTreeHost(LayerTreeHost* layer_tree_host) OVERRIDE;
33 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) 33 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
34 OVERRIDE; 34 OVERRIDE;
35 virtual Region VisibleContentOpaqueRegion() const OVERRIDE; 35 virtual Region VisibleContentOpaqueRegion() const OVERRIDE;
36 virtual void Update(ResourceUpdateQueue* queue, 36 virtual void Update(ResourceUpdateQueue* queue,
37 const OcclusionTracker* occlusion, 37 const OcclusionTracker* occlusion) OVERRIDE;
38 RenderingStats* stats) OVERRIDE;
39 38
40 protected: 39 protected:
41 TiledLayer(); 40 TiledLayer();
42 virtual ~TiledLayer(); 41 virtual ~TiledLayer();
43 42
44 void UpdateTileSizeAndTilingOption(); 43 void UpdateTileSizeAndTilingOption();
45 void UpdateBounds(); 44 void UpdateBounds();
46 45
47 // Exposed to subclasses for testing. 46 // Exposed to subclasses for testing.
48 void SetTileSize(gfx::Size size); 47 void SetTileSize(gfx::Size size);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 int right, 88 int right,
90 int bottom, 89 int bottom,
91 const OcclusionTracker* occlusion); 90 const OcclusionTracker* occlusion);
92 91
93 bool UpdateTiles(int left, 92 bool UpdateTiles(int left,
94 int top, 93 int top,
95 int right, 94 int right,
96 int bottom, 95 int bottom,
97 ResourceUpdateQueue* queue, 96 ResourceUpdateQueue* queue,
98 const OcclusionTracker* occlusion, 97 const OcclusionTracker* occlusion,
99 RenderingStats* stats,
100 bool* did_paint); 98 bool* did_paint);
101 bool HaveTexturesForTiles(int left, 99 bool HaveTexturesForTiles(int left,
102 int top, 100 int top,
103 int right, 101 int right,
104 int bottom, 102 int bottom,
105 bool ignore_occlusions); 103 bool ignore_occlusions);
106 gfx::Rect MarkTilesForUpdate(int left, 104 gfx::Rect MarkTilesForUpdate(int left,
107 int top, 105 int top,
108 int right, 106 int right,
109 int bottom, 107 int bottom,
110 bool ignore_occlusions); 108 bool ignore_occlusions);
111 void UpdateTileTextures(gfx::Rect paint_rect, 109 void UpdateTileTextures(gfx::Rect paint_rect,
112 int left, 110 int left,
113 int top, 111 int top,
114 int right, 112 int right,
115 int bottom, 113 int bottom,
116 ResourceUpdateQueue* queue, 114 ResourceUpdateQueue* queue,
117 const OcclusionTracker* occlusion, 115 const OcclusionTracker* occlusion);
118 RenderingStats* stats);
119 void UpdateScrollPrediction(); 116 void UpdateScrollPrediction();
120 117
121 UpdatableTile* TileAt(int i, int j) const; 118 UpdatableTile* TileAt(int i, int j) const;
122 UpdatableTile* CreateTile(int i, int j); 119 UpdatableTile* CreateTile(int i, int j);
123 120
124 bool IsSmallAnimatedLayer() const; 121 bool IsSmallAnimatedLayer() const;
125 122
126 unsigned texture_format_; 123 unsigned texture_format_;
127 bool skips_draw_; 124 bool skips_draw_;
128 bool failed_update_; 125 bool failed_update_;
129 126
130 // Used for predictive painting. 127 // Used for predictive painting.
131 gfx::Vector2d predicted_scroll_; 128 gfx::Vector2d predicted_scroll_;
132 gfx::Rect predicted_visible_rect_; 129 gfx::Rect predicted_visible_rect_;
133 gfx::Rect previous_visible_rect_; 130 gfx::Rect previous_visible_rect_;
134 gfx::Size previous_content_bounds_; 131 gfx::Size previous_content_bounds_;
135 132
136 TilingOption tiling_option_; 133 TilingOption tiling_option_;
137 scoped_ptr<LayerTilingData> tiler_; 134 scoped_ptr<LayerTilingData> tiler_;
138 135
139 DISALLOW_COPY_AND_ASSIGN(TiledLayer); 136 DISALLOW_COPY_AND_ASSIGN(TiledLayer);
140 }; 137 };
141 138
142 } // namespace cc 139 } // namespace cc
143 140
144 #endif // CC_LAYERS_TILED_LAYER_H_ 141 #endif // CC_LAYERS_TILED_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/texture_layer.cc ('k') | cc/layers/tiled_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698