OLD | NEW |
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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) | 89 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) |
90 OVERRIDE; | 90 OVERRIDE; |
91 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; | 91 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; |
92 virtual void AppendQuads(QuadSink* quad_sink, | 92 virtual void AppendQuads(QuadSink* quad_sink, |
93 AppendQuadsData* append_quads_data) OVERRIDE; | 93 AppendQuadsData* append_quads_data) OVERRIDE; |
94 virtual void UpdateTilePriorities() OVERRIDE; | 94 virtual void UpdateTilePriorities() OVERRIDE; |
95 virtual void NotifyTileStateChanged(const Tile* tile) OVERRIDE; | 95 virtual void NotifyTileStateChanged(const Tile* tile) OVERRIDE; |
96 virtual void DidBecomeActive() OVERRIDE; | 96 virtual void DidBecomeActive() OVERRIDE; |
97 virtual void DidBeginTracing() OVERRIDE; | 97 virtual void DidBeginTracing() OVERRIDE; |
98 virtual void ReleaseResources() OVERRIDE; | 98 virtual void ReleaseResources() OVERRIDE; |
| 99 virtual void CalculateContentsScale(float ideal_contents_scale, |
| 100 float device_scale_factor, |
| 101 float page_scale_factor, |
| 102 float maximum_animation_contents_scale, |
| 103 bool animating_transform_to_screen, |
| 104 float* contents_scale_x, |
| 105 float* contents_scale_y, |
| 106 gfx::Size* content_bounds) OVERRIDE; |
99 virtual skia::RefPtr<SkPicture> GetPicture() OVERRIDE; | 107 virtual skia::RefPtr<SkPicture> GetPicture() OVERRIDE; |
100 | 108 |
101 // PictureLayerTilingClient overrides. | 109 // PictureLayerTilingClient overrides. |
102 virtual scoped_refptr<Tile> CreateTile( | 110 virtual scoped_refptr<Tile> CreateTile( |
103 PictureLayerTiling* tiling, | 111 PictureLayerTiling* tiling, |
104 const gfx::Rect& content_rect) OVERRIDE; | 112 const gfx::Rect& content_rect) OVERRIDE; |
105 virtual void UpdatePile(Tile* tile) OVERRIDE; | 113 virtual void UpdatePile(Tile* tile) OVERRIDE; |
106 virtual gfx::Size CalculateTileSize( | 114 virtual gfx::Size CalculateTileSize( |
107 const gfx::Size& content_bounds) const OVERRIDE; | 115 const gfx::Size& content_bounds) const OVERRIDE; |
108 virtual const Region* GetInvalidation() OVERRIDE; | 116 virtual const Region* GetInvalidation() OVERRIDE; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 void DoPostCommitInitialization(); | 172 void DoPostCommitInitialization(); |
165 | 173 |
166 bool CanHaveTilings() const; | 174 bool CanHaveTilings() const; |
167 bool CanHaveTilingWithScale(float contents_scale) const; | 175 bool CanHaveTilingWithScale(float contents_scale) const; |
168 void SanityCheckTilingState() const; | 176 void SanityCheckTilingState() const; |
169 | 177 |
170 virtual void GetDebugBorderProperties( | 178 virtual void GetDebugBorderProperties( |
171 SkColor* color, float* width) const OVERRIDE; | 179 SkColor* color, float* width) const OVERRIDE; |
172 virtual void AsValueInto(base::DictionaryValue* dict) const OVERRIDE; | 180 virtual void AsValueInto(base::DictionaryValue* dict) const OVERRIDE; |
173 | 181 |
174 virtual void UpdateIdealScales(); | |
175 float MaximumTilingContentsScale() const; | |
176 | |
177 PictureLayerImpl* twin_layer_; | 182 PictureLayerImpl* twin_layer_; |
178 | 183 |
179 scoped_ptr<PictureLayerTilingSet> tilings_; | 184 scoped_ptr<PictureLayerTilingSet> tilings_; |
180 scoped_refptr<PicturePileImpl> pile_; | 185 scoped_refptr<PicturePileImpl> pile_; |
181 Region invalidation_; | 186 Region invalidation_; |
182 | 187 |
183 bool is_mask_; | 188 bool is_mask_; |
184 | 189 |
185 float ideal_page_scale_; | 190 float ideal_page_scale_; |
186 float ideal_device_scale_; | 191 float ideal_device_scale_; |
(...skipping 19 matching lines...) Expand all Loading... |
206 gfx::Size viewport_size_for_tile_priority_; | 211 gfx::Size viewport_size_for_tile_priority_; |
207 gfx::Transform screen_space_transform_for_tile_priority_; | 212 gfx::Transform screen_space_transform_for_tile_priority_; |
208 | 213 |
209 friend class PictureLayer; | 214 friend class PictureLayer; |
210 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 215 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
211 }; | 216 }; |
212 | 217 |
213 } // namespace cc | 218 } // namespace cc |
214 | 219 |
215 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 220 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |