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 2559413002: [1/5] Pass transformed rasterization policy from Blink (Closed)
Patch Set: Created 4 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void UpdateCanUseLCDTextAfterCommit(); 72 void UpdateCanUseLCDTextAfterCommit();
73 bool RasterSourceUsesLCDText() const; 73 bool RasterSourceUsesLCDText() const;
74 WhichTree GetTree() const; 74 WhichTree GetTree() const;
75 75
76 // Mask-related functions. 76 // Mask-related functions.
77 void GetContentsResourceId(ResourceId* resource_id, 77 void GetContentsResourceId(ResourceId* resource_id,
78 gfx::Size* resource_size) const override; 78 gfx::Size* resource_size) const override;
79 79
80 void SetNearestNeighbor(bool nearest_neighbor); 80 void SetNearestNeighbor(bool nearest_neighbor);
81 81
82 void SetUseTransformedRasterization(bool use);
83
82 size_t GPUMemoryUsageInBytes() const override; 84 size_t GPUMemoryUsageInBytes() const override;
83 85
84 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override; 86 void RunMicroBenchmark(MicroBenchmarkImpl* benchmark) override;
85 87
86 bool CanHaveTilings() const; 88 bool CanHaveTilings() const;
87 89
88 PictureLayerTilingSet* picture_layer_tiling_set() { return tilings_.get(); } 90 PictureLayerTilingSet* picture_layer_tiling_set() { return tilings_.get(); }
89 91
90 // Functions used by tile manager. 92 // Functions used by tile manager.
91 PictureLayerImpl* GetPendingOrActiveTwinLayer() const; 93 PictureLayerImpl* GetPendingOrActiveTwinLayer() const;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 float raster_device_scale_; 141 float raster_device_scale_;
140 float raster_source_scale_; 142 float raster_source_scale_;
141 float raster_contents_scale_; 143 float raster_contents_scale_;
142 float low_res_raster_contents_scale_; 144 float low_res_raster_contents_scale_;
143 145
144 bool was_screen_space_transform_animating_; 146 bool was_screen_space_transform_animating_;
145 bool only_used_low_res_last_append_quads_; 147 bool only_used_low_res_last_append_quads_;
146 const bool is_mask_; 148 const bool is_mask_;
147 149
148 bool nearest_neighbor_; 150 bool nearest_neighbor_;
151 bool use_transformed_rasterization_;
149 bool is_directly_composited_image_; 152 bool is_directly_composited_image_;
150 153
151 // Use this instead of |visible_layer_rect()| for tiling calculations. This 154 // Use this instead of |visible_layer_rect()| for tiling calculations. This
152 // takes external viewport and transform for tile priority into account. 155 // takes external viewport and transform for tile priority into account.
153 gfx::Rect viewport_rect_for_tile_priority_in_content_space_; 156 gfx::Rect viewport_rect_for_tile_priority_in_content_space_;
154 157
155 gfx::Size gpu_raster_max_texture_size_; 158 gfx::Size gpu_raster_max_texture_size_;
156 159
157 // List of tilings that were used last time we appended quads. This can be 160 // List of tilings that were used last time we appended quads. This can be
158 // used as an optimization not to remove tilings if they are still being 161 // used as an optimization not to remove tilings if they are still being
159 // drawn. Note that accessing this vector should only be done in the context 162 // drawn. Note that accessing this vector should only be done in the context
160 // of comparing pointers, since objects pointed to are not guaranteed to 163 // of comparing pointers, since objects pointed to are not guaranteed to
161 // exist. 164 // exist.
162 std::vector<PictureLayerTiling*> last_append_quads_tilings_; 165 std::vector<PictureLayerTiling*> last_append_quads_tilings_;
163 166
164 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 167 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
165 }; 168 };
166 169
167 } // namespace cc 170 } // namespace cc
168 171
169 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 172 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698