Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_LAYERS_PICTURE_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 | 144 |
| 145 virtual size_t GPUMemoryUsageInBytes() const override; | 145 virtual size_t GPUMemoryUsageInBytes() const override; |
| 146 | 146 |
| 147 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; | 147 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; |
| 148 | 148 |
| 149 // Functions used by tile manager. | 149 // Functions used by tile manager. |
| 150 PictureLayerImpl* GetTwinLayer() { return twin_layer_; } | 150 PictureLayerImpl* GetTwinLayer() { return twin_layer_; } |
| 151 bool IsOnActiveOrPendingTree() const; | 151 bool IsOnActiveOrPendingTree() const; |
| 152 // Virtual for testing. | 152 // Virtual for testing. |
| 153 virtual bool HasValidTilePriorities() const; | 153 virtual bool HasValidTilePriorities() const; |
| 154 bool AllTilesRequiredAreReadyToDraw( | |
|
vmpstr
2014/10/24 18:02:23
Can you put a comment here explaining what this fu
| |
| 155 const char* event_name, | |
|
vmpstr
2014/10/24 18:02:23
const std::string&?
ernstm
2014/10/27 21:13:56
Removed.
| |
| 156 const base::Callback<bool(PictureLayerTiling* tiling, const Tile*)>& | |
| 157 IsTileRequiredCallback) const; | |
|
vmpstr
2014/10/24 18:02:23
this should be named as a variable, not a function
ernstm
2014/10/27 21:13:56
Done.
| |
| 158 static bool IsTileRequiredForActivation(PictureLayerTiling* tiling, | |
|
vmpstr
2014/10/24 18:02:23
These should be anonymous in the implementation.
ernstm
2014/10/27 21:13:56
Done.
| |
| 159 const Tile* tile); | |
| 160 static bool IsTileRequiredForDraw(PictureLayerTiling* tiling, | |
| 161 const Tile* tile); | |
| 154 bool AllTilesRequiredForActivationAreReadyToDraw() const; | 162 bool AllTilesRequiredForActivationAreReadyToDraw() const; |
| 163 bool AllTilesRequiredForDrawAreReadyToDraw() const; | |
| 155 | 164 |
| 156 protected: | 165 protected: |
| 157 friend class LayerRasterTileIterator; | 166 friend class LayerRasterTileIterator; |
| 158 | 167 |
| 159 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); | 168 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); |
| 160 PictureLayerTiling* AddTiling(float contents_scale); | 169 PictureLayerTiling* AddTiling(float contents_scale); |
| 161 void RemoveTiling(float contents_scale); | 170 void RemoveTiling(float contents_scale); |
| 162 void RemoveAllTilings(); | 171 void RemoveAllTilings(); |
| 163 void SyncFromActiveLayer(const PictureLayerImpl* other); | 172 void SyncFromActiveLayer(const PictureLayerImpl* other); |
| 164 void AddTilingsForRasterScale(); | 173 void AddTilingsForRasterScale(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 // frame that has a valid viewport for prioritizing tiles. | 236 // frame that has a valid viewport for prioritizing tiles. |
| 228 gfx::Rect visible_rect_for_tile_priority_; | 237 gfx::Rect visible_rect_for_tile_priority_; |
| 229 | 238 |
| 230 friend class PictureLayer; | 239 friend class PictureLayer; |
| 231 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 240 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 232 }; | 241 }; |
| 233 | 242 |
| 234 } // namespace cc | 243 } // namespace cc |
| 235 | 244 |
| 236 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 245 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |