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

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

Issue 367833003: cc: Start using raster/eviction iterators. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + fix Created 6 years, 3 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_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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 const gfx::Size& content_bounds) const OVERRIDE; 126 const gfx::Size& content_bounds) const OVERRIDE;
127 virtual const Region* GetInvalidation() OVERRIDE; 127 virtual const Region* GetInvalidation() OVERRIDE;
128 virtual const PictureLayerTiling* GetTwinTiling( 128 virtual const PictureLayerTiling* GetTwinTiling(
129 const PictureLayerTiling* tiling) const OVERRIDE; 129 const PictureLayerTiling* tiling) const OVERRIDE;
130 virtual PictureLayerTiling* GetRecycledTwinTiling( 130 virtual PictureLayerTiling* GetRecycledTwinTiling(
131 const PictureLayerTiling* tiling) OVERRIDE; 131 const PictureLayerTiling* tiling) OVERRIDE;
132 virtual size_t GetMaxTilesForInterestArea() const OVERRIDE; 132 virtual size_t GetMaxTilesForInterestArea() const OVERRIDE;
133 virtual float GetSkewportTargetTimeInSeconds() const OVERRIDE; 133 virtual float GetSkewportTargetTimeInSeconds() const OVERRIDE;
134 virtual int GetSkewportExtrapolationLimitInContentPixels() const OVERRIDE; 134 virtual int GetSkewportExtrapolationLimitInContentPixels() const OVERRIDE;
135 virtual WhichTree GetTree() const OVERRIDE; 135 virtual WhichTree GetTree() const OVERRIDE;
136 virtual bool RequiresHighResToDraw() const OVERRIDE;
136 137
137 // PushPropertiesTo active tree => pending tree. 138 // PushPropertiesTo active tree => pending tree.
138 void SyncTiling(const PictureLayerTiling* tiling); 139 void SyncTiling(const PictureLayerTiling* tiling);
139 140
140 // Mask-related functions. 141 // Mask-related functions.
141 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE; 142 virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE;
142 143
143 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE; 144 virtual size_t GPUMemoryUsageInBytes() const OVERRIDE;
144 145
145 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE; 146 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) OVERRIDE;
(...skipping 15 matching lines...) Expand all
161 void SyncFromActiveLayer(const PictureLayerImpl* other); 162 void SyncFromActiveLayer(const PictureLayerImpl* other);
162 void AddTilingsForRasterScale(); 163 void AddTilingsForRasterScale();
163 void UpdateTilePriorities(const Occlusion& occlusion_in_content_space); 164 void UpdateTilePriorities(const Occlusion& occlusion_in_content_space);
164 virtual bool ShouldAdjustRasterScale() const; 165 virtual bool ShouldAdjustRasterScale() const;
165 virtual void RecalculateRasterScales(); 166 virtual void RecalculateRasterScales();
166 void CleanUpTilingsOnActiveLayer( 167 void CleanUpTilingsOnActiveLayer(
167 std::vector<PictureLayerTiling*> used_tilings); 168 std::vector<PictureLayerTiling*> used_tilings);
168 float MinimumContentsScale() const; 169 float MinimumContentsScale() const;
169 float SnappedContentsScale(float new_contents_scale); 170 float SnappedContentsScale(float new_contents_scale);
170 void ResetRasterScale(); 171 void ResetRasterScale();
171 void MarkVisibleResourcesAsRequired() const;
172 bool MarkVisibleTilesAsRequired(
173 PictureLayerTiling* tiling,
174 const PictureLayerTiling* optional_twin_tiling,
175 const gfx::Rect& rect,
176 const Region& missing_region) const;
177 gfx::Rect GetViewportForTilePriorityInContentSpace() const; 172 gfx::Rect GetViewportForTilePriorityInContentSpace() const;
178 PictureLayerImpl* GetRecycledTwinLayer(); 173 PictureLayerImpl* GetRecycledTwinLayer();
179 174
180 void DoPostCommitInitializationIfNeeded() { 175 void DoPostCommitInitializationIfNeeded() {
181 if (needs_post_commit_initialization_) 176 if (needs_post_commit_initialization_)
182 DoPostCommitInitialization(); 177 DoPostCommitInitialization();
183 } 178 }
184 void DoPostCommitInitialization(); 179 void DoPostCommitInitialization();
185 180
186 bool CanHaveTilings() const; 181 bool CanHaveTilings() const;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 gfx::Rect viewport_rect_for_tile_priority_; 223 gfx::Rect viewport_rect_for_tile_priority_;
229 gfx::Transform screen_space_transform_for_tile_priority_; 224 gfx::Transform screen_space_transform_for_tile_priority_;
230 225
231 friend class PictureLayer; 226 friend class PictureLayer;
232 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 227 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
233 }; 228 };
234 229
235 } // namespace cc 230 } // namespace cc
236 231
237 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 232 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698