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

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

Issue 775483002: cc: Remove max tiles and skewport constants from tiling client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // PictureLayerTilingClient overrides. 94 // PictureLayerTilingClient overrides.
95 scoped_refptr<Tile> CreateTile(PictureLayerTiling* tiling, 95 scoped_refptr<Tile> CreateTile(PictureLayerTiling* tiling,
96 const gfx::Rect& content_rect) override; 96 const gfx::Rect& content_rect) override;
97 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; 97 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override;
98 const Region* GetPendingInvalidation() override; 98 const Region* GetPendingInvalidation() override;
99 const PictureLayerTiling* GetPendingOrActiveTwinTiling( 99 const PictureLayerTiling* GetPendingOrActiveTwinTiling(
100 const PictureLayerTiling* tiling) const override; 100 const PictureLayerTiling* tiling) const override;
101 PictureLayerTiling* GetRecycledTwinTiling( 101 PictureLayerTiling* GetRecycledTwinTiling(
102 const PictureLayerTiling* tiling) override; 102 const PictureLayerTiling* tiling) override;
103 TilePriority::PriorityBin GetMaxTilePriorityBin() const override; 103 TilePriority::PriorityBin GetMaxTilePriorityBin() const override;
104 size_t GetMaxTilesForInterestArea() const override;
105 float GetSkewportTargetTimeInSeconds() const override;
106 int GetSkewportExtrapolationLimitInContentPixels() const override;
107 WhichTree GetTree() const override; 104 WhichTree GetTree() const override;
108 bool RequiresHighResToDraw() const override; 105 bool RequiresHighResToDraw() const override;
109 106
110 // PushPropertiesTo active tree => pending tree. 107 // PushPropertiesTo active tree => pending tree.
111 void SyncTiling(const PictureLayerTiling* tiling); 108 void SyncTiling(const PictureLayerTiling* tiling);
112 109
113 // Mask-related functions. 110 // Mask-related functions.
114 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, 111 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id,
115 gfx::Size* resource_size) const override; 112 gfx::Size* resource_size) const override;
116 void set_is_mask(bool is_mask) { is_mask_ = is_mask; } 113 void set_is_mask(bool is_mask) { is_mask_ = is_mask; }
(...skipping 12 matching lines...) Expand all
129 bool AllTilesRequiredForActivationAreReadyToDraw() const; 126 bool AllTilesRequiredForActivationAreReadyToDraw() const;
130 bool AllTilesRequiredForDrawAreReadyToDraw() const; 127 bool AllTilesRequiredForDrawAreReadyToDraw() const;
131 128
132 protected: 129 protected:
133 friend class LayerRasterTileIterator; 130 friend class LayerRasterTileIterator;
134 using TileRequirementCheck = bool (PictureLayerTiling::*)(const Tile*) const; 131 using TileRequirementCheck = bool (PictureLayerTiling::*)(const Tile*) const;
135 132
136 PictureLayerImpl(LayerTreeImpl* tree_impl, int id); 133 PictureLayerImpl(LayerTreeImpl* tree_impl, int id);
137 PictureLayerTiling* AddTiling(float contents_scale); 134 PictureLayerTiling* AddTiling(float contents_scale);
138 void RemoveAllTilings(); 135 void RemoveAllTilings();
136 // Removes all tilings and sets new values for new tilings.
137 void ResetTileCache();
138
139 void SyncFromActiveLayer(const PictureLayerImpl* other); 139 void SyncFromActiveLayer(const PictureLayerImpl* other);
140 void AddTilingsForRasterScale(); 140 void AddTilingsForRasterScale();
141 void UpdateTilePriorities(const Occlusion& occlusion_in_content_space); 141 void UpdateTilePriorities(const Occlusion& occlusion_in_content_space);
142 virtual bool ShouldAdjustRasterScale() const; 142 virtual bool ShouldAdjustRasterScale() const;
143 virtual void RecalculateRasterScales(); 143 virtual void RecalculateRasterScales();
144 void CleanUpTilingsOnActiveLayer( 144 void CleanUpTilingsOnActiveLayer(
145 std::vector<PictureLayerTiling*> used_tilings); 145 std::vector<PictureLayerTiling*> used_tilings);
146 float MinimumContentsScale() const; 146 float MinimumContentsScale() const;
147 void ResetRasterScale(); 147 void ResetRasterScale();
148 gfx::Rect GetViewportForTilePriorityInContentSpace() const; 148 gfx::Rect GetViewportForTilePriorityInContentSpace() const;
149 PictureLayerImpl* GetRecycledTwinLayer() const; 149 PictureLayerImpl* GetRecycledTwinLayer() const;
150 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source); 150 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source);
151 size_t GetMaxTilesForInterestArea() const;
152 float GetSkewportTargetTimeInSeconds() const;
153 int GetSkewportExtrapolationLimitInContentPixels() const;
151 154
152 void DoPostCommitInitializationIfNeeded() { 155 void DoPostCommitInitializationIfNeeded() {
153 if (needs_post_commit_initialization_) 156 if (needs_post_commit_initialization_)
154 DoPostCommitInitialization(); 157 DoPostCommitInitialization();
155 } 158 }
156 void DoPostCommitInitialization(); 159 void DoPostCommitInitialization();
157 160
158 bool CanHaveTilingWithScale(float contents_scale) const; 161 bool CanHaveTilingWithScale(float contents_scale) const;
159 void SanityCheckTilingState() const; 162 void SanityCheckTilingState() const;
160 // Checks if all tiles required for a certain action (e.g. activation) are 163 // Checks if all tiles required for a certain action (e.g. activation) are
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // frame that has a valid viewport for prioritizing tiles. 209 // frame that has a valid viewport for prioritizing tiles.
207 gfx::Rect visible_rect_for_tile_priority_; 210 gfx::Rect visible_rect_for_tile_priority_;
208 211
209 friend class PictureLayer; 212 friend class PictureLayer;
210 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 213 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
211 }; 214 };
212 215
213 } // namespace cc 216 } // namespace cc
214 217
215 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 218 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698