| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 UI_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_H_ |
| 6 #define UI_COMPOSITOR_LAYER_H_ | 6 #define UI_COMPOSITOR_LAYER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 virtual const gfx::Transform& GetTransformForAnimation() const OVERRIDE; | 322 virtual const gfx::Transform& GetTransformForAnimation() const OVERRIDE; |
| 323 virtual float GetOpacityForAnimation() const OVERRIDE; | 323 virtual float GetOpacityForAnimation() const OVERRIDE; |
| 324 virtual bool GetVisibilityForAnimation() const OVERRIDE; | 324 virtual bool GetVisibilityForAnimation() const OVERRIDE; |
| 325 virtual float GetBrightnessForAnimation() const OVERRIDE; | 325 virtual float GetBrightnessForAnimation() const OVERRIDE; |
| 326 virtual float GetGrayscaleForAnimation() const OVERRIDE; | 326 virtual float GetGrayscaleForAnimation() const OVERRIDE; |
| 327 virtual SkColor GetColorForAnimation() const OVERRIDE; | 327 virtual SkColor GetColorForAnimation() const OVERRIDE; |
| 328 | 328 |
| 329 void CreateWebLayer(); | 329 void CreateWebLayer(); |
| 330 void RecomputeTransform(); | 330 void RecomputeTransform(); |
| 331 void RecomputeDrawsContentAndUVRect(); | 331 void RecomputeDrawsContentAndUVRect(); |
| 332 void RecomputeDebugBorderColor(); | |
| 333 | 332 |
| 334 // Set all filters which got applied to the layer. | 333 // Set all filters which got applied to the layer. |
| 335 void SetLayerFilters(); | 334 void SetLayerFilters(); |
| 336 | 335 |
| 337 const LayerType type_; | 336 const LayerType type_; |
| 338 | 337 |
| 339 Compositor* compositor_; | 338 Compositor* compositor_; |
| 340 | 339 |
| 341 scoped_refptr<ui::Texture> texture_; | 340 scoped_refptr<ui::Texture> texture_; |
| 342 | 341 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 385 |
| 387 scoped_refptr<LayerAnimator> animator_; | 386 scoped_refptr<LayerAnimator> animator_; |
| 388 | 387 |
| 389 // Ownership of the layer is held through one of the strongly typed layer | 388 // Ownership of the layer is held through one of the strongly typed layer |
| 390 // pointers, depending on which sort of layer this is. | 389 // pointers, depending on which sort of layer this is. |
| 391 scoped_ptr<WebKit::WebContentLayer> content_layer_; | 390 scoped_ptr<WebKit::WebContentLayer> content_layer_; |
| 392 scoped_ptr<WebKit::WebExternalTextureLayer> texture_layer_; | 391 scoped_ptr<WebKit::WebExternalTextureLayer> texture_layer_; |
| 393 scoped_ptr<WebKit::WebSolidColorLayer> solid_color_layer_; | 392 scoped_ptr<WebKit::WebSolidColorLayer> solid_color_layer_; |
| 394 WebKit::WebLayer* web_layer_; | 393 WebKit::WebLayer* web_layer_; |
| 395 bool web_layer_is_accelerated_; | 394 bool web_layer_is_accelerated_; |
| 396 bool show_debug_borders_; | |
| 397 | 395 |
| 398 // If true, the layer scales the canvas and the texture with the device scale | 396 // If true, the layer scales the canvas and the texture with the device scale |
| 399 // factor as appropriate. When true, the texture size is in DIP. | 397 // factor as appropriate. When true, the texture size is in DIP. |
| 400 bool scale_content_; | 398 bool scale_content_; |
| 401 | 399 |
| 402 // A cached copy of |Compositor::device_scale_factor()|. | 400 // A cached copy of |Compositor::device_scale_factor()|. |
| 403 float device_scale_factor_; | 401 float device_scale_factor_; |
| 404 | 402 |
| 405 DISALLOW_COPY_AND_ASSIGN(Layer); | 403 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 406 }; | 404 }; |
| 407 | 405 |
| 408 } // namespace ui | 406 } // namespace ui |
| 409 | 407 |
| 410 #endif // UI_COMPOSITOR_LAYER_H_ | 408 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |