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

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

Issue 1024633002: cc: Keep tilings texture size in sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix broken test Created 5 years, 9 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
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 const PictureLayerTiling* GetPendingOrActiveTwinTiling( 71 const PictureLayerTiling* GetPendingOrActiveTwinTiling(
72 const PictureLayerTiling* tiling) const override; 72 const PictureLayerTiling* tiling) const override;
73 PictureLayerTiling* GetRecycledTwinTiling( 73 PictureLayerTiling* GetRecycledTwinTiling(
74 const PictureLayerTiling* tiling) override; 74 const PictureLayerTiling* tiling) override;
75 TilePriority::PriorityBin GetMaxTilePriorityBin() const override; 75 TilePriority::PriorityBin GetMaxTilePriorityBin() const override;
76 WhichTree GetTree() const override; 76 WhichTree GetTree() const override;
77 bool RequiresHighResToDraw() const override; 77 bool RequiresHighResToDraw() const override;
78 78
79 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source, 79 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source,
80 Region* new_invalidation, 80 Region* new_invalidation,
81 const PictureLayerTilingSet* pending_set); 81 const PictureLayerTilingSet* pending_set,
82 gfx::Size gpu_raster_max_texture_size);
82 bool UpdateTiles(bool resourceless_software_draw); 83 bool UpdateTiles(bool resourceless_software_draw);
83 void UpdateCanUseLCDTextAfterCommit(); 84 void UpdateCanUseLCDTextAfterCommit();
84 bool RasterSourceUsesLCDText() const; 85 bool RasterSourceUsesLCDText() const;
85 86
86 // Mask-related functions. 87 // Mask-related functions.
87 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, 88 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id,
88 gfx::Size* resource_size) const override; 89 gfx::Size* resource_size) const override;
89 90
90 void SetNearestNeighbor(bool nearest_neighbor); 91 void SetNearestNeighbor(bool nearest_neighbor);
91 92
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 165
165 // Any draw properties derived from |transform|, |viewport|, and |clip| 166 // Any draw properties derived from |transform|, |viewport|, and |clip|
166 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid 167 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid
167 // for prioritizing tiles during resourceless software draws. This is because 168 // for prioritizing tiles during resourceless software draws. This is because
168 // resourceless software draws can have wildly different transforms/viewports 169 // resourceless software draws can have wildly different transforms/viewports
169 // from regular draws. Save a copy of the required draw properties of the last 170 // from regular draws. Save a copy of the required draw properties of the last
170 // frame that has a valid viewport for prioritizing tiles. 171 // frame that has a valid viewport for prioritizing tiles.
171 gfx::Rect visible_rect_for_tile_priority_; 172 gfx::Rect visible_rect_for_tile_priority_;
172 gfx::Rect viewport_rect_for_tile_priority_in_content_space_; 173 gfx::Rect viewport_rect_for_tile_priority_in_content_space_;
173 174
175 gfx::Size gpu_raster_max_texture_size_;
176
174 // List of tilings that were used last time we appended quads. This can be 177 // List of tilings that were used last time we appended quads. This can be
175 // used as an optimization not to remove tilings if they are still being 178 // used as an optimization not to remove tilings if they are still being
176 // drawn. Note that accessing this vector should only be done in the context 179 // drawn. Note that accessing this vector should only be done in the context
177 // of comparing pointers, since objects pointed to are not guaranteed to 180 // of comparing pointers, since objects pointed to are not guaranteed to
178 // exist. 181 // exist.
179 std::vector<PictureLayerTiling*> last_append_quads_tilings_; 182 std::vector<PictureLayerTiling*> last_append_quads_tilings_;
180 183
181 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 184 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
182 }; 185 };
183 186
184 } // namespace cc 187 } // namespace cc
185 188
186 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 189 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698