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

Side by Side Diff: cc/tiles/tile.h

Issue 2334003007: cc: Mark tiles as processed for solid color analysis. (Closed)
Patch Set: update Created 4 years, 3 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 | « no previous file | cc/tiles/tile.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_TILES_TILE_H_ 5 #ifndef CC_TILES_TILE_H_
6 #define CC_TILES_TILE_H_ 6 #define CC_TILES_TILE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 invalidated_id_ = previous_tile_id; 100 invalidated_id_ = previous_tile_id;
101 } 101 }
102 102
103 Id invalidated_id() const { return invalidated_id_; } 103 Id invalidated_id() const { return invalidated_id_; }
104 const gfx::Rect& invalidated_content_rect() const { 104 const gfx::Rect& invalidated_content_rect() const {
105 return invalidated_content_rect_; 105 return invalidated_content_rect_;
106 } 106 }
107 107
108 bool HasRasterTask() const { return !!raster_task_.get(); } 108 bool HasRasterTask() const { return !!raster_task_.get(); }
109 109
110 void set_solid_color_analysis_performed(bool performed) {
111 is_solid_color_analysis_performed_ = performed;
112 }
113 bool is_solid_color_analysis_performed() const {
114 return is_solid_color_analysis_performed_;
115 }
116
110 private: 117 private:
111 friend class TileManager; 118 friend class TileManager;
112 friend class FakeTileManager; 119 friend class FakeTileManager;
113 friend class FakePictureLayerImpl; 120 friend class FakePictureLayerImpl;
114 121
115 // Methods called by by tile manager. 122 // Methods called by by tile manager.
116 Tile(TileManager* tile_manager, 123 Tile(TileManager* tile_manager,
117 const CreateInfo& info, 124 const CreateInfo& info,
118 int layer_id, 125 int layer_id,
119 int source_frame_number, 126 int source_frame_number,
120 int flags); 127 int flags);
121 ~Tile(); 128 ~Tile();
122 129
123 TileManager* const tile_manager_; 130 TileManager* const tile_manager_;
124 const gfx::Rect content_rect_; 131 const gfx::Rect content_rect_;
125 const gfx::Rect enclosing_layer_rect_; 132 const gfx::Rect enclosing_layer_rect_;
126 const float contents_scale_; 133 const float contents_scale_;
127 134
128 TileDrawInfo draw_info_; 135 TileDrawInfo draw_info_;
129 136
130 const int layer_id_; 137 const int layer_id_;
131 const int source_frame_number_; 138 const int source_frame_number_;
132 const int flags_; 139 const int flags_;
133 const int tiling_i_index_; 140 const int tiling_i_index_;
134 const int tiling_j_index_; 141 const int tiling_j_index_;
135 bool required_for_activation_ : 1; 142 bool required_for_activation_ : 1;
136 bool required_for_draw_ : 1; 143 bool required_for_draw_ : 1;
144 bool is_solid_color_analysis_performed_ : 1;
137 145
138 Id id_; 146 Id id_;
139 147
140 // The rect bounding the changes in this Tile vs the previous tile it 148 // The rect bounding the changes in this Tile vs the previous tile it
141 // replaced. 149 // replaced.
142 gfx::Rect invalidated_content_rect_; 150 gfx::Rect invalidated_content_rect_;
143 // The |id_| of the Tile that was invalidated and replaced by this tile. 151 // The |id_| of the Tile that was invalidated and replaced by this tile.
144 Id invalidated_id_; 152 Id invalidated_id_;
145 153
146 unsigned scheduled_priority_; 154 unsigned scheduled_priority_;
147
148 scoped_refptr<TileTask> raster_task_; 155 scoped_refptr<TileTask> raster_task_;
149 156
150 DISALLOW_COPY_AND_ASSIGN(Tile); 157 DISALLOW_COPY_AND_ASSIGN(Tile);
151 }; 158 };
152 159
153 using ScopedTilePtr = std::unique_ptr<Tile, Tile::Deleter>; 160 using ScopedTilePtr = std::unique_ptr<Tile, Tile::Deleter>;
154 161
155 } // namespace cc 162 } // namespace cc
156 163
157 #endif // CC_TILES_TILE_H_ 164 #endif // CC_TILES_TILE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/tiles/tile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698