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

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: 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* GetTwinLayer() { return twin_layer_; } 147 PictureLayerImpl* GetTwinLayer() { return twin_layer_; }
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 10 matching lines...) Expand all
172 173
173 void DoPostCommitInitializationIfNeeded() { 174 void DoPostCommitInitializationIfNeeded() {
174 if (needs_post_commit_initialization_) 175 if (needs_post_commit_initialization_)
175 DoPostCommitInitialization(); 176 DoPostCommitInitialization();
176 } 177 }
177 void DoPostCommitInitialization(); 178 void DoPostCommitInitialization();
178 179
179 bool CanHaveTilings() const; 180 bool CanHaveTilings() const;
180 bool CanHaveTilingWithScale(float contents_scale) const; 181 bool CanHaveTilingWithScale(float contents_scale) const;
181 void SanityCheckTilingState() const; 182 void SanityCheckTilingState() const;
183 // Checks if all tiles required for a certain action (e.g. activation) are
184 // ready to draw. is_tile_required_callback gets called on all candidate
185 // tiles and returns true if the tile is required for the action.
186 bool AllTilesRequiredAreReadyToDraw(
187 const base::Callback<bool(PictureLayerTiling* tiling, const Tile*)>&
188 is_tile_required_callback) const;
182 189
183 bool ShouldAdjustRasterScaleDuringScaleAnimations() const; 190 bool ShouldAdjustRasterScaleDuringScaleAnimations() const;
184 191
185 void GetDebugBorderProperties(SkColor* color, float* width) const override; 192 void GetDebugBorderProperties(SkColor* color, float* width) const override;
186 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const override; 193 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const override;
187 void AsValueInto(base::debug::TracedValue* dict) const override; 194 void AsValueInto(base::debug::TracedValue* dict) const override;
188 195
189 virtual void UpdateIdealScales(); 196 virtual void UpdateIdealScales();
190 float MaximumTilingContentsScale() const; 197 float MaximumTilingContentsScale() const;
191 198
(...skipping 30 matching lines...) Expand all
222 // frame that has a valid viewport for prioritizing tiles. 229 // frame that has a valid viewport for prioritizing tiles.
223 gfx::Rect visible_rect_for_tile_priority_; 230 gfx::Rect visible_rect_for_tile_priority_;
224 231
225 friend class PictureLayer; 232 friend class PictureLayer;
226 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 233 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
227 }; 234 };
228 235
229 } // namespace cc 236 } // namespace cc
230 237
231 #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