| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 scoped_ptr<cc::Animation> animation) OVERRIDE; | 367 scoped_ptr<cc::Animation> animation) OVERRIDE; |
| 368 virtual void RemoveThreadedAnimation(int animation_id) OVERRIDE; | 368 virtual void RemoveThreadedAnimation(int animation_id) OVERRIDE; |
| 369 | 369 |
| 370 // Creates a corresponding composited layer for |type_|. | 370 // Creates a corresponding composited layer for |type_|. |
| 371 void CreateWebLayer(); | 371 void CreateWebLayer(); |
| 372 | 372 |
| 373 // Recomputes and sets to |cc_layer_|. | 373 // Recomputes and sets to |cc_layer_|. |
| 374 void RecomputeDrawsContentAndUVRect(); | 374 void RecomputeDrawsContentAndUVRect(); |
| 375 void RecomputePosition(); | 375 void RecomputePosition(); |
| 376 | 376 |
| 377 // Recomputes the AlphaShape mask based on the |device_scaling_factor|. |
| 378 void RecomputeAlphaShape(); |
| 379 |
| 377 // Set all filters which got applied to the layer. | 380 // Set all filters which got applied to the layer. |
| 378 void SetLayerFilters(); | 381 void SetLayerFilters(); |
| 379 | 382 |
| 380 // Set all filters which got applied to the layer background. | 383 // Set all filters which got applied to the layer background. |
| 381 void SetLayerBackgroundFilters(); | 384 void SetLayerBackgroundFilters(); |
| 382 | 385 |
| 383 // Cleanup |cc_layer_| and replaces it with |new_layer|. | 386 // Cleanup |cc_layer_| and replaces it with |new_layer|. |
| 384 void SwitchToLayer(scoped_refptr<cc::Layer> new_layer); | 387 void SwitchToLayer(scoped_refptr<cc::Layer> new_layer); |
| 385 | 388 |
| 386 // We cannot send animations to our cc_layer_ until we have been added to a | 389 // We cannot send animations to our cc_layer_ until we have been added to a |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 // while attached to the main layer before the main layer is deleted. | 431 // while attached to the main layer before the main layer is deleted. |
| 429 Layer* layer_mask_back_link_; | 432 Layer* layer_mask_back_link_; |
| 430 | 433 |
| 431 // The zoom factor to scale the layer by. Zooming is disabled when this is | 434 // The zoom factor to scale the layer by. Zooming is disabled when this is |
| 432 // set to 1. | 435 // set to 1. |
| 433 float zoom_; | 436 float zoom_; |
| 434 | 437 |
| 435 // Width of the border in pixels, where the scaling is blended. | 438 // Width of the border in pixels, where the scaling is blended. |
| 436 int zoom_inset_; | 439 int zoom_inset_; |
| 437 | 440 |
| 438 // Shape of the window. | 441 // The alpha shape specifies the area that is visible (and matches the area |
| 442 // that accepts input events). |
| 443 // |dips_alpha_shape_| is the device independent shape. |
| 444 // |alpha_shape_| is the shape adjusted by the |device_scale_factor_|. |
| 445 scoped_ptr<SkRegion> dips_alpha_shape_; |
| 439 scoped_ptr<SkRegion> alpha_shape_; | 446 scoped_ptr<SkRegion> alpha_shape_; |
| 440 | 447 |
| 441 std::string name_; | 448 std::string name_; |
| 442 | 449 |
| 443 LayerDelegate* delegate_; | 450 LayerDelegate* delegate_; |
| 444 | 451 |
| 445 LayerOwner* owner_; | 452 LayerOwner* owner_; |
| 446 | 453 |
| 447 scoped_refptr<LayerAnimator> animator_; | 454 scoped_refptr<LayerAnimator> animator_; |
| 448 | 455 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 471 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 478 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 472 // or SetTextureMailbox was called. | 479 // or SetTextureMailbox was called. |
| 473 gfx::Size frame_size_in_dip_; | 480 gfx::Size frame_size_in_dip_; |
| 474 | 481 |
| 475 DISALLOW_COPY_AND_ASSIGN(Layer); | 482 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 476 }; | 483 }; |
| 477 | 484 |
| 478 } // namespace ui | 485 } // namespace ui |
| 479 | 486 |
| 480 #endif // UI_COMPOSITOR_LAYER_H_ | 487 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |