Chromium Code Reviews| 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 void RecomputeAlphaShape(); | |
|
Wez
2014/06/08 00:55:54
Add an explanatory comment?
garykac
2014/06/09 21:30:00
Done.
| |
| 378 | |
| 377 // Set all filters which got applied to the layer. | 379 // Set all filters which got applied to the layer. |
| 378 void SetLayerFilters(); | 380 void SetLayerFilters(); |
| 379 | 381 |
| 380 // Set all filters which got applied to the layer background. | 382 // Set all filters which got applied to the layer background. |
| 381 void SetLayerBackgroundFilters(); | 383 void SetLayerBackgroundFilters(); |
| 382 | 384 |
| 383 // Cleanup |cc_layer_| and replaces it with |new_layer|. | 385 // Cleanup |cc_layer_| and replaces it with |new_layer|. |
| 384 void SwitchToLayer(scoped_refptr<cc::Layer> new_layer); | 386 void SwitchToLayer(scoped_refptr<cc::Layer> new_layer); |
| 385 | 387 |
| 386 // We cannot send animations to our cc_layer_ until we have been added to a | 388 // 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. | 430 // while attached to the main layer before the main layer is deleted. |
| 429 Layer* layer_mask_back_link_; | 431 Layer* layer_mask_back_link_; |
| 430 | 432 |
| 431 // The zoom factor to scale the layer by. Zooming is disabled when this is | 433 // The zoom factor to scale the layer by. Zooming is disabled when this is |
| 432 // set to 1. | 434 // set to 1. |
| 433 float zoom_; | 435 float zoom_; |
| 434 | 436 |
| 435 // Width of the border in pixels, where the scaling is blended. | 437 // Width of the border in pixels, where the scaling is blended. |
| 436 int zoom_inset_; | 438 int zoom_inset_; |
| 437 | 439 |
| 438 // Shape of the window. | 440 // The alpha shape specifies the area that is visible (and matches the area |
| 441 // that accepts input events). | |
| 442 // |raw_alpha_shape_| is the shape as specified and |alpha_shape_| is the | |
| 443 // shape after being adjusted by the |device_scale_factor_|. | |
| 444 scoped_ptr<SkRegion> raw_alpha_shape_; | |
|
Wez
2014/06/08 00:55:54
nit: Would |dips_alpha_shape_| and |device_alpha_s
garykac
2014/06/09 21:29:59
I updated raw_ to dips_ and updated the comment.
| |
| 439 scoped_ptr<SkRegion> alpha_shape_; | 445 scoped_ptr<SkRegion> alpha_shape_; |
| 440 | 446 |
| 441 std::string name_; | 447 std::string name_; |
| 442 | 448 |
| 443 LayerDelegate* delegate_; | 449 LayerDelegate* delegate_; |
| 444 | 450 |
| 445 LayerOwner* owner_; | 451 LayerOwner* owner_; |
| 446 | 452 |
| 447 scoped_refptr<LayerAnimator> animator_; | 453 scoped_refptr<LayerAnimator> animator_; |
| 448 | 454 |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 471 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 477 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 472 // or SetTextureMailbox was called. | 478 // or SetTextureMailbox was called. |
| 473 gfx::Size frame_size_in_dip_; | 479 gfx::Size frame_size_in_dip_; |
| 474 | 480 |
| 475 DISALLOW_COPY_AND_ASSIGN(Layer); | 481 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 476 }; | 482 }; |
| 477 | 483 |
| 478 } // namespace ui | 484 } // namespace ui |
| 479 | 485 |
| 480 #endif // UI_COMPOSITOR_LAYER_H_ | 486 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |