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

Side by Side Diff: cc/layers/picture_layer_impl.h

Issue 672283003: cc: ReadyToDraw notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More clean-ups. Created 6 years, 1 month 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/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('J')
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_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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 size_t GPUMemoryUsageInBytes() const override; 142 size_t GPUMemoryUsageInBytes() const override;
143 143
144 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; 144 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override;
145 145
146 // Functions used by tile manager. 146 // Functions used by tile manager.
147 PictureLayerImpl* GetPendingOrActiveTwinLayer() const; 147 PictureLayerImpl* GetPendingOrActiveTwinLayer() const;
148 bool IsOnActiveOrPendingTree() const; 148 bool IsOnActiveOrPendingTree() const;
149 // Virtual for testing. 149 // Virtual for testing.
150 virtual bool HasValidTilePriorities() const; 150 virtual bool HasValidTilePriorities() const;
151 bool AllTilesRequiredForActivationAreReadyToDraw() const; 151 bool AllTilesRequiredForActivationAreReadyToDraw() const;
152 bool AllTilesRequiredForDrawAreReadyToDraw() const;
152 153
153 protected: 154 protected:
154 friend class LayerRasterTileIterator; 155 friend class LayerRasterTileIterator;
155 156
156 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); 157 PictureLayerImpl(LayerTreeImpl* tree_impl, int id);
157 PictureLayerTiling* AddTiling(float contents_scale); 158 PictureLayerTiling* AddTiling(float contents_scale);
158 void RemoveTiling(float contents_scale); 159 void RemoveTiling(float contents_scale);
159 void RemoveAllTilings(); 160 void RemoveAllTilings();
160 void SyncFromActiveLayer(const PictureLayerImpl* other); 161 void SyncFromActiveLayer(const PictureLayerImpl* other);
161 void AddTilingsForRasterScale(); 162 void AddTilingsForRasterScale();
(...skipping 11 matching lines...) Expand all
173 174
174 void DoPostCommitInitializationIfNeeded() { 175 void DoPostCommitInitializationIfNeeded() {
175 if (needs_post_commit_initialization_) 176 if (needs_post_commit_initialization_)
176 DoPostCommitInitialization(); 177 DoPostCommitInitialization();
177 } 178 }
178 void DoPostCommitInitialization(); 179 void DoPostCommitInitialization();
179 180
180 bool CanHaveTilings() const; 181 bool CanHaveTilings() const;
181 bool CanHaveTilingWithScale(float contents_scale) const; 182 bool CanHaveTilingWithScale(float contents_scale) const;
182 void SanityCheckTilingState() const; 183 void SanityCheckTilingState() const;
184 // Checks if all tiles required for a certain action (e.g. activation) are
185 // ready to draw. is_tile_required_callback gets called on all candidate
186 // tiles and returns true if the tile is required for the action.
187 template <typename F>
188 bool AllTilesRequiredAreReadyToDraw(const F& is_tile_required_callback) const;
183 189
184 bool ShouldAdjustRasterScaleDuringScaleAnimations() const; 190 bool ShouldAdjustRasterScaleDuringScaleAnimations() const;
185 191
186 void GetDebugBorderProperties(SkColor* color, float* width) const override; 192 void GetDebugBorderProperties(SkColor* color, float* width) const override;
187 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const override; 193 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const override;
188 void AsValueInto(base::debug::TracedValue* dict) const override; 194 void AsValueInto(base::debug::TracedValue* dict) const override;
189 195
190 virtual void UpdateIdealScales(); 196 virtual void UpdateIdealScales();
191 float MaximumTilingContentsScale() const; 197 float MaximumTilingContentsScale() const;
192 198
(...skipping 30 matching lines...) Expand all
223 // frame that has a valid viewport for prioritizing tiles. 229 // frame that has a valid viewport for prioritizing tiles.
224 gfx::Rect visible_rect_for_tile_priority_; 230 gfx::Rect visible_rect_for_tile_priority_;
225 231
226 friend class PictureLayer; 232 friend class PictureLayer;
227 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 233 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
228 }; 234 };
229 235
230 } // namespace cc 236 } // namespace cc
231 237
232 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 238 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698