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

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

Issue 2726343004: cc: Optimize decode scheduling for checker-images. (Closed)
Patch Set: rebase Created 3 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/tiles/prioritized_tile.cc ('k') | cc/tiles/tile_draw_info.h » ('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
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "cc/paint/draw_image.h"
13 #include "cc/raster/tile_task.h" 14 #include "cc/raster/tile_task.h"
14 #include "cc/tiles/tile_draw_info.h" 15 #include "cc/tiles/tile_draw_info.h"
15 #include "ui/gfx/geometry/axis_transform2d.h" 16 #include "ui/gfx/geometry/axis_transform2d.h"
16 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
17 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
18 19
19 namespace cc { 20 namespace cc {
20 21
21 class PictureLayerTiling; 22 class PictureLayerTiling;
22 class TileManager; 23 class TileManager;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 111
111 bool HasRasterTask() const { return !!raster_task_.get(); } 112 bool HasRasterTask() const { return !!raster_task_.get(); }
112 113
113 void set_solid_color_analysis_performed(bool performed) { 114 void set_solid_color_analysis_performed(bool performed) {
114 is_solid_color_analysis_performed_ = performed; 115 is_solid_color_analysis_performed_ = performed;
115 } 116 }
116 bool is_solid_color_analysis_performed() const { 117 bool is_solid_color_analysis_performed() const {
117 return is_solid_color_analysis_performed_; 118 return is_solid_color_analysis_performed_;
118 } 119 }
119 120
121 bool set_raster_task_scheduled_with_checker_images(bool has_checker_images) {
122 bool previous_value = raster_task_scheduled_with_checker_images_;
123 raster_task_scheduled_with_checker_images_ = has_checker_images;
124 return previous_value;
125 }
126 bool raster_task_scheduled_with_checker_images() const {
127 return raster_task_scheduled_with_checker_images_;
128 }
129
120 const PictureLayerTiling* tiling() const { return tiling_; } 130 const PictureLayerTiling* tiling() const { return tiling_; }
121 void set_tiling(const PictureLayerTiling* tiling) { tiling_ = tiling; } 131 void set_tiling(const PictureLayerTiling* tiling) { tiling_ = tiling; }
122 132
123 private: 133 private:
124 friend class TileManager; 134 friend class TileManager;
125 friend class FakeTileManager; 135 friend class FakeTileManager;
126 friend class FakePictureLayerImpl; 136 friend class FakePictureLayerImpl;
127 137
128 // Methods called by by tile manager. 138 // Methods called by by tile manager.
129 Tile(TileManager* tile_manager, 139 Tile(TileManager* tile_manager,
(...skipping 21 matching lines...) Expand all
151 161
152 Id id_; 162 Id id_;
153 163
154 // The rect bounding the changes in this Tile vs the previous tile it 164 // The rect bounding the changes in this Tile vs the previous tile it
155 // replaced. 165 // replaced.
156 gfx::Rect invalidated_content_rect_; 166 gfx::Rect invalidated_content_rect_;
157 // The |id_| of the Tile that was invalidated and replaced by this tile. 167 // The |id_| of the Tile that was invalidated and replaced by this tile.
158 Id invalidated_id_; 168 Id invalidated_id_;
159 169
160 unsigned scheduled_priority_; 170 unsigned scheduled_priority_;
171
172 // Set to true if there is a raster task scheduled for this tile that will
173 // rasterize a resource with checker images.
174 bool raster_task_scheduled_with_checker_images_ = false;
161 scoped_refptr<TileTask> raster_task_; 175 scoped_refptr<TileTask> raster_task_;
162 176
163 DISALLOW_COPY_AND_ASSIGN(Tile); 177 DISALLOW_COPY_AND_ASSIGN(Tile);
164 }; 178 };
165 179
166 } // namespace cc 180 } // namespace cc
167 181
168 #endif // CC_TILES_TILE_H_ 182 #endif // CC_TILES_TILE_H_
OLDNEW
« no previous file with comments | « cc/tiles/prioritized_tile.cc ('k') | cc/tiles/tile_draw_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698