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

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

Issue 343463004: Move occlusion info to TilePriority. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback Created 6 years, 6 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 | Annotate | Revision Log
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_RESOURCES_TILE_H_ 5 #ifndef CC_RESOURCES_TILE_H_
6 #define CC_RESOURCES_TILE_H_ 6 #define CC_RESOURCES_TILE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 RasterMode DetermineOverallRasterMode() const; 125 RasterMode DetermineOverallRasterMode() const;
126 126
127 // Functionality used in tests. 127 // Functionality used in tests.
128 RasterMode GetRasterModeForTesting() const { 128 RasterMode GetRasterModeForTesting() const {
129 return managed_state().raster_mode; 129 return managed_state().raster_mode;
130 } 130 }
131 ManagedTileState::TileVersion& GetTileVersionForTesting(RasterMode mode) { 131 ManagedTileState::TileVersion& GetTileVersionForTesting(RasterMode mode) {
132 return managed_state_.tile_versions[mode]; 132 return managed_state_.tile_versions[mode];
133 } 133 }
134 134
135 void set_is_occluded(bool is_occluded) { is_occluded_ = is_occluded; }
136 bool is_occluded() const { return is_occluded_; }
137
138 private: 135 private:
139 friend class TileManager; 136 friend class TileManager;
140 friend class PrioritizedTileSet; 137 friend class PrioritizedTileSet;
141 friend class FakeTileManager; 138 friend class FakeTileManager;
142 friend class BinComparator; 139 friend class BinComparator;
143 friend class FakePictureLayerImpl; 140 friend class FakePictureLayerImpl;
144 141
145 // Methods called by by tile manager. 142 // Methods called by by tile manager.
146 Tile(TileManager* tile_manager, 143 Tile(TileManager* tile_manager,
147 PicturePileImpl* picture_pile, 144 PicturePileImpl* picture_pile,
148 const gfx::Size& tile_size, 145 const gfx::Size& tile_size,
149 const gfx::Rect& content_rect, 146 const gfx::Rect& content_rect,
150 const gfx::Rect& opaque_rect, 147 const gfx::Rect& opaque_rect,
151 float contents_scale, 148 float contents_scale,
152 int layer_id, 149 int layer_id,
153 int source_frame_number, 150 int source_frame_number,
154 int flags); 151 int flags);
155 ~Tile(); 152 ~Tile();
156 153
157 ManagedTileState& managed_state() { return managed_state_; } 154 ManagedTileState& managed_state() { return managed_state_; }
158 const ManagedTileState& managed_state() const { return managed_state_; } 155 const ManagedTileState& managed_state() const { return managed_state_; }
159 RasterMode DetermineRasterModeForResolution(TileResolution resolution) const; 156 RasterMode DetermineRasterModeForResolution(TileResolution resolution) const;
160 157
161 TileManager* tile_manager_; 158 TileManager* tile_manager_;
162 scoped_refptr<PicturePileImpl> picture_pile_; 159 scoped_refptr<PicturePileImpl> picture_pile_;
163 gfx::Rect tile_size_; 160 gfx::Rect tile_size_;
164 gfx::Rect content_rect_; 161 gfx::Rect content_rect_;
165 float contents_scale_; 162 float contents_scale_;
166 gfx::Rect opaque_rect_; 163 gfx::Rect opaque_rect_;
167 bool is_occluded_;
168 164
169 TilePriority priority_[NUM_TREES]; 165 TilePriority priority_[NUM_TREES];
170 ManagedTileState managed_state_; 166 ManagedTileState managed_state_;
171 int layer_id_; 167 int layer_id_;
172 int source_frame_number_; 168 int source_frame_number_;
173 int flags_; 169 int flags_;
174 170
175 Id id_; 171 Id id_;
176 static Id s_next_id_; 172 static Id s_next_id_;
177 173
178 DISALLOW_COPY_AND_ASSIGN(Tile); 174 DISALLOW_COPY_AND_ASSIGN(Tile);
179 }; 175 };
180 176
181 } // namespace cc 177 } // namespace cc
182 178
183 #endif // CC_RESOURCES_TILE_H_ 179 #endif // CC_RESOURCES_TILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698