OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_LAYER_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 virtual bool NeedMoreUpdates(); | 272 virtual bool NeedMoreUpdates(); |
273 virtual void SetIsMask(bool is_mask) {} | 273 virtual void SetIsMask(bool is_mask) {} |
274 | 274 |
275 void SetDebugName(const std::string& debug_name); | 275 void SetDebugName(const std::string& debug_name); |
276 | 276 |
277 virtual void PushPropertiesTo(LayerImpl* layer); | 277 virtual void PushPropertiesTo(LayerImpl* layer); |
278 | 278 |
279 void ClearRenderSurface() { draw_properties_.render_surface.reset(); } | 279 void ClearRenderSurface() { draw_properties_.render_surface.reset(); } |
280 void CreateRenderSurface(); | 280 void CreateRenderSurface(); |
281 | 281 |
282 // The contentsScale converts from logical, non-page-scaled pixels to target | 282 // The contents scale converts from logical, non-page-scaled pixels to target |
283 // pixels. The contentsScale is 1 for the root layer as it is already in | 283 // pixels. The contents scale is 1 for the root layer as it is already in |
284 // physical pixels. By default contentsScale is forced to be 1 except for | 284 // physical pixels. By default contents scale is forced to be 1 except for |
285 // subclasses of ContentsScalingLayer. | 285 // subclasses of ContentsScalingLayer. |
286 float contents_scale_x() const { return draw_properties_.contents_scale_x; } | 286 float contents_scale_x() const { return draw_properties_.contents_scale_x; } |
287 float contents_scale_y() const { return draw_properties_.contents_scale_y; } | 287 float contents_scale_y() const { return draw_properties_.contents_scale_y; } |
288 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } | 288 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } |
289 | 289 |
290 virtual void CalculateContentsScale(float ideal_contents_scale, | 290 virtual void CalculateContentsScale(float ideal_contents_scale, |
291 bool animating_transform_to_screen, | 291 bool animating_transform_to_screen, |
292 float* contents_scale_x, | 292 float* contents_scale_x, |
293 float* contents_scale_y, | 293 float* contents_scale_y, |
294 gfx::Size* content_bounds); | 294 gfx::Size* content_bounds); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 WebKit::WebLayerScrollClient* layer_scroll_client_; | 479 WebKit::WebLayerScrollClient* layer_scroll_client_; |
480 | 480 |
481 DrawProperties<Layer, RenderSurface> draw_properties_; | 481 DrawProperties<Layer, RenderSurface> draw_properties_; |
482 | 482 |
483 DISALLOW_COPY_AND_ASSIGN(Layer); | 483 DISALLOW_COPY_AND_ASSIGN(Layer); |
484 }; | 484 }; |
485 | 485 |
486 } // namespace cc | 486 } // namespace cc |
487 | 487 |
488 #endif // CC_LAYERS_LAYER_H_ | 488 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |