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

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

Issue 1028333002: Chromium -> Mojo roll. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »
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 <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "cc/base/cc_export.h" 12 #include "cc/base/cc_export.h"
13 #include "cc/base/scoped_ptr_vector.h" 13 #include "cc/base/scoped_ptr_vector.h"
14 #include "cc/layers/layer_impl.h" 14 #include "cc/layers/layer_impl.h"
15 #include "cc/resources/picture_layer_tiling.h" 15 #include "cc/resources/picture_layer_tiling.h"
16 #include "cc/resources/picture_layer_tiling_set.h" 16 #include "cc/resources/picture_layer_tiling_set.h"
17 #include "cc/resources/picture_pile_impl.h" 17 #include "cc/resources/picture_pile_impl.h"
18 #include "cc/resources/tiling_set_eviction_queue.h" 18 #include "cc/resources/tiling_set_eviction_queue.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 const gfx::Rect& content_rect) override; 68 const gfx::Rect& content_rect) override;
69 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override; 69 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override;
70 const Region* GetPendingInvalidation() override; 70 const Region* GetPendingInvalidation() override;
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 gfx::Rect GetEnclosingRectInTargetSpace() const override;
78 79
80 void set_gpu_raster_max_texture_size(gfx::Size gpu_raster_max_texture_size) {
81 gpu_raster_max_texture_size_ = gpu_raster_max_texture_size;
82 }
79 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source, 83 void UpdateRasterSource(scoped_refptr<RasterSource> raster_source,
80 Region* new_invalidation, 84 Region* new_invalidation,
81 const PictureLayerTilingSet* pending_set); 85 const PictureLayerTilingSet* pending_set);
82 bool UpdateTiles(bool resourceless_software_draw); 86 bool UpdateTiles(bool resourceless_software_draw);
83 void UpdateCanUseLCDTextAfterCommit(); 87 void UpdateCanUseLCDTextAfterCommit();
84 bool RasterSourceUsesLCDText() const; 88 bool RasterSourceUsesLCDText() const;
85 89
86 // Mask-related functions. 90 // Mask-related functions.
87 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, 91 void GetContentsResourceId(ResourceProvider::ResourceId* resource_id,
88 gfx::Size* resource_size) const override; 92 gfx::Size* resource_size) const override;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 float MinimumContentsScale() const; 128 float MinimumContentsScale() const;
125 float MaximumContentsScale() const; 129 float MaximumContentsScale() const;
126 void ResetRasterScale(); 130 void ResetRasterScale();
127 void UpdateViewportRectForTilePriorityInContentSpace(); 131 void UpdateViewportRectForTilePriorityInContentSpace();
128 PictureLayerImpl* GetRecycledTwinLayer() const; 132 PictureLayerImpl* GetRecycledTwinLayer() const;
129 133
130 void SanityCheckTilingState() const; 134 void SanityCheckTilingState() const;
131 bool ShouldAdjustRasterScaleDuringScaleAnimations() const; 135 bool ShouldAdjustRasterScaleDuringScaleAnimations() const;
132 136
133 void GetDebugBorderProperties(SkColor* color, float* width) const override; 137 void GetDebugBorderProperties(SkColor* color, float* width) const override;
134 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const override; 138 void GetAllTilesAndPrioritiesForTracing(
139 std::map<const Tile*, TilePriority>* tile_map) const override;
135 void AsValueInto(base::trace_event::TracedValue* dict) const override; 140 void AsValueInto(base::trace_event::TracedValue* dict) const override;
136 141
137 virtual void UpdateIdealScales(); 142 virtual void UpdateIdealScales();
138 float MaximumTilingContentsScale() const; 143 float MaximumTilingContentsScale() const;
139 scoped_ptr<PictureLayerTilingSet> CreatePictureLayerTilingSet(); 144 scoped_ptr<PictureLayerTilingSet> CreatePictureLayerTilingSet();
140 145
141 PictureLayerImpl* twin_layer_; 146 PictureLayerImpl* twin_layer_;
142 147
143 scoped_ptr<PictureLayerTilingSet> tilings_; 148 scoped_ptr<PictureLayerTilingSet> tilings_;
144 scoped_refptr<RasterSource> raster_source_; 149 scoped_refptr<RasterSource> raster_source_;
(...skipping 19 matching lines...) Expand all
164 169
165 // Any draw properties derived from |transform|, |viewport|, and |clip| 170 // Any draw properties derived from |transform|, |viewport|, and |clip|
166 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid 171 // parameters in LayerTreeHostImpl::SetExternalDrawConstraints are not valid
167 // for prioritizing tiles during resourceless software draws. This is because 172 // for prioritizing tiles during resourceless software draws. This is because
168 // resourceless software draws can have wildly different transforms/viewports 173 // resourceless software draws can have wildly different transforms/viewports
169 // from regular draws. Save a copy of the required draw properties of the last 174 // from regular draws. Save a copy of the required draw properties of the last
170 // frame that has a valid viewport for prioritizing tiles. 175 // frame that has a valid viewport for prioritizing tiles.
171 gfx::Rect visible_rect_for_tile_priority_; 176 gfx::Rect visible_rect_for_tile_priority_;
172 gfx::Rect viewport_rect_for_tile_priority_in_content_space_; 177 gfx::Rect viewport_rect_for_tile_priority_in_content_space_;
173 178
179 gfx::Size gpu_raster_max_texture_size_;
180
174 // List of tilings that were used last time we appended quads. This can be 181 // 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 182 // 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 183 // 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 184 // of comparing pointers, since objects pointed to are not guaranteed to
178 // exist. 185 // exist.
179 std::vector<PictureLayerTiling*> last_append_quads_tilings_; 186 std::vector<PictureLayerTiling*> last_append_quads_tilings_;
180 187
181 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 188 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
182 }; 189 };
183 190
184 } // namespace cc 191 } // namespace cc
185 192
186 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 193 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698