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

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: Rebase Created 6 years, 5 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
« no previous file with comments | « cc/resources/prioritized_tile_set_unittest.cc ('k') | cc/resources/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_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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 RasterMode DetermineOverallRasterMode() const; 121 RasterMode DetermineOverallRasterMode() const;
122 122
123 // Functionality used in tests. 123 // Functionality used in tests.
124 RasterMode GetRasterModeForTesting() const { 124 RasterMode GetRasterModeForTesting() const {
125 return managed_state().raster_mode; 125 return managed_state().raster_mode;
126 } 126 }
127 ManagedTileState::TileVersion& GetTileVersionForTesting(RasterMode mode) { 127 ManagedTileState::TileVersion& GetTileVersionForTesting(RasterMode mode) {
128 return managed_state_.tile_versions[mode]; 128 return managed_state_.tile_versions[mode];
129 } 129 }
130 130
131 void set_is_occluded(bool is_occluded) { is_occluded_ = is_occluded; }
132 bool is_occluded() const { return is_occluded_; }
133
134 private: 131 private:
135 friend class TileManager; 132 friend class TileManager;
136 friend class PrioritizedTileSet; 133 friend class PrioritizedTileSet;
137 friend class FakeTileManager; 134 friend class FakeTileManager;
138 friend class BinComparator; 135 friend class BinComparator;
139 friend class FakePictureLayerImpl; 136 friend class FakePictureLayerImpl;
140 137
141 // Methods called by by tile manager. 138 // Methods called by by tile manager.
142 Tile(TileManager* tile_manager, 139 Tile(TileManager* tile_manager,
143 PicturePileImpl* picture_pile, 140 PicturePileImpl* picture_pile,
144 const gfx::Size& tile_size, 141 const gfx::Size& tile_size,
145 const gfx::Rect& content_rect, 142 const gfx::Rect& content_rect,
146 const gfx::Rect& opaque_rect, 143 const gfx::Rect& opaque_rect,
147 float contents_scale, 144 float contents_scale,
148 int layer_id, 145 int layer_id,
149 int source_frame_number, 146 int source_frame_number,
150 int flags); 147 int flags);
151 ~Tile(); 148 ~Tile();
152 149
153 ManagedTileState& managed_state() { return managed_state_; } 150 ManagedTileState& managed_state() { return managed_state_; }
154 const ManagedTileState& managed_state() const { return managed_state_; } 151 const ManagedTileState& managed_state() const { return managed_state_; }
155 RasterMode DetermineRasterModeForResolution(TileResolution resolution) const; 152 RasterMode DetermineRasterModeForResolution(TileResolution resolution) const;
156 153
157 TileManager* tile_manager_; 154 TileManager* tile_manager_;
158 scoped_refptr<PicturePileImpl> picture_pile_; 155 scoped_refptr<PicturePileImpl> picture_pile_;
159 gfx::Rect tile_size_; 156 gfx::Rect tile_size_;
160 gfx::Rect content_rect_; 157 gfx::Rect content_rect_;
161 float contents_scale_; 158 float contents_scale_;
162 gfx::Rect opaque_rect_; 159 gfx::Rect opaque_rect_;
163 bool is_occluded_;
164 160
165 TilePriority priority_[NUM_TREES]; 161 TilePriority priority_[NUM_TREES];
166 ManagedTileState managed_state_; 162 ManagedTileState managed_state_;
167 int layer_id_; 163 int layer_id_;
168 int source_frame_number_; 164 int source_frame_number_;
169 int flags_; 165 int flags_;
170 166
171 Id id_; 167 Id id_;
172 static Id s_next_id_; 168 static Id s_next_id_;
173 169
174 DISALLOW_COPY_AND_ASSIGN(Tile); 170 DISALLOW_COPY_AND_ASSIGN(Tile);
175 }; 171 };
176 172
177 } // namespace cc 173 } // namespace cc
178 174
179 #endif // CC_RESOURCES_TILE_H_ 175 #endif // CC_RESOURCES_TILE_H_
OLDNEW
« no previous file with comments | « cc/resources/prioritized_tile_set_unittest.cc ('k') | cc/resources/tile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698