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

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

Issue 2845143002: cc: Allow changing mask type when pushing properties. (Closed)
Patch Set: Add comment to SetLayerMaskType Created 3 years, 7 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 20 matching lines...) Expand all
31 : public LayerImpl, 31 : public LayerImpl,
32 NON_EXPORTED_BASE(public PictureLayerTilingClient) { 32 NON_EXPORTED_BASE(public PictureLayerTilingClient) {
33 public: 33 public:
34 static std::unique_ptr<PictureLayerImpl> 34 static std::unique_ptr<PictureLayerImpl>
35 Create(LayerTreeImpl* tree_impl, int id, Layer::LayerMaskType mask_type) { 35 Create(LayerTreeImpl* tree_impl, int id, Layer::LayerMaskType mask_type) {
36 return base::WrapUnique(new PictureLayerImpl(tree_impl, id, mask_type)); 36 return base::WrapUnique(new PictureLayerImpl(tree_impl, id, mask_type));
37 } 37 }
38 ~PictureLayerImpl() override; 38 ~PictureLayerImpl() override;
39 39
40 Layer::LayerMaskType mask_type() const { return mask_type_; } 40 Layer::LayerMaskType mask_type() const { return mask_type_; }
41 void SetLayerMaskType(Layer::LayerMaskType type);
41 42
42 // LayerImpl overrides. 43 // LayerImpl overrides.
43 const char* LayerTypeAsString() const override; 44 const char* LayerTypeAsString() const override;
44 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 45 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
45 void PushPropertiesTo(LayerImpl* layer) override; 46 void PushPropertiesTo(LayerImpl* layer) override;
46 void AppendQuads(RenderPass* render_pass, 47 void AppendQuads(RenderPass* render_pass,
47 AppendQuadsData* append_quads_data) override; 48 AppendQuadsData* append_quads_data) override;
48 void NotifyTileStateChanged(const Tile* tile) override; 49 void NotifyTileStateChanged(const Tile* tile) override;
49 void ResetRasterScale(); 50 void ResetRasterScale();
50 void DidBeginTracing() override; 51 void DidBeginTracing() override;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 float ideal_contents_scale_; 144 float ideal_contents_scale_;
144 145
145 float raster_page_scale_; 146 float raster_page_scale_;
146 float raster_device_scale_; 147 float raster_device_scale_;
147 float raster_source_scale_; 148 float raster_source_scale_;
148 float raster_contents_scale_; 149 float raster_contents_scale_;
149 float low_res_raster_contents_scale_; 150 float low_res_raster_contents_scale_;
150 151
151 bool was_screen_space_transform_animating_; 152 bool was_screen_space_transform_animating_;
152 bool only_used_low_res_last_append_quads_; 153 bool only_used_low_res_last_append_quads_;
153 const Layer::LayerMaskType mask_type_; 154 Layer::LayerMaskType mask_type_;
154 155
155 bool nearest_neighbor_; 156 bool nearest_neighbor_;
156 bool use_transformed_rasterization_; 157 bool use_transformed_rasterization_;
157 bool is_directly_composited_image_; 158 bool is_directly_composited_image_;
158 159
159 // Use this instead of |visible_layer_rect()| for tiling calculations. This 160 // Use this instead of |visible_layer_rect()| for tiling calculations. This
160 // takes external viewport and transform for tile priority into account. 161 // takes external viewport and transform for tile priority into account.
161 gfx::Rect viewport_rect_for_tile_priority_in_content_space_; 162 gfx::Rect viewport_rect_for_tile_priority_in_content_space_;
162 163
163 gfx::Size gpu_raster_max_texture_size_; 164 gfx::Size gpu_raster_max_texture_size_;
164 165
165 // List of tilings that were used last time we appended quads. This can be 166 // List of tilings that were used last time we appended quads. This can be
166 // used as an optimization not to remove tilings if they are still being 167 // used as an optimization not to remove tilings if they are still being
167 // drawn. Note that accessing this vector should only be done in the context 168 // drawn. Note that accessing this vector should only be done in the context
168 // of comparing pointers, since objects pointed to are not guaranteed to 169 // of comparing pointers, since objects pointed to are not guaranteed to
169 // exist. 170 // exist.
170 std::vector<PictureLayerTiling*> last_append_quads_tilings_; 171 std::vector<PictureLayerTiling*> last_append_quads_tilings_;
171 172
172 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 173 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
173 }; 174 };
174 175
175 } // namespace cc 176 } // namespace cc
176 177
177 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 178 #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