| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 scoped_refptr<cc::Layer> content_layer_; | 507 scoped_refptr<cc::Layer> content_layer_; |
| 508 scoped_refptr<cc::NinePatchLayer> nine_patch_layer_; | 508 scoped_refptr<cc::NinePatchLayer> nine_patch_layer_; |
| 509 scoped_refptr<cc::TextureLayer> texture_layer_; | 509 scoped_refptr<cc::TextureLayer> texture_layer_; |
| 510 scoped_refptr<cc::SolidColorLayer> solid_color_layer_; | 510 scoped_refptr<cc::SolidColorLayer> solid_color_layer_; |
| 511 scoped_refptr<cc::DelegatedRendererLayer> delegated_renderer_layer_; | 511 scoped_refptr<cc::DelegatedRendererLayer> delegated_renderer_layer_; |
| 512 scoped_refptr<cc::SurfaceLayer> surface_layer_; | 512 scoped_refptr<cc::SurfaceLayer> surface_layer_; |
| 513 cc::Layer* cc_layer_; | 513 cc::Layer* cc_layer_; |
| 514 | 514 |
| 515 // A cached copy of |Compositor::device_scale_factor()|. | 515 // A cached copy of |Compositor::device_scale_factor()|. |
| 516 float device_scale_factor_; | 516 float device_scale_factor_; |
| 517 // When a layer become invisible, we make the corresponding cc_layer |
| 518 // transparent (opacity = 0) and cache its actual opacity value. This is used |
| 519 // to set it back when the layer becomes visible. |
| 520 float cached_cc_layer_opacity_; |
| 517 | 521 |
| 518 // A cached copy of the nine patch layer's image and aperture. | 522 // A cached copy of the nine patch layer's image and aperture. |
| 519 // These are required for device scale factor change. | 523 // These are required for device scale factor change. |
| 520 gfx::ImageSkia nine_patch_layer_image_; | 524 gfx::ImageSkia nine_patch_layer_image_; |
| 521 gfx::Rect nine_patch_layer_aperture_; | 525 gfx::Rect nine_patch_layer_aperture_; |
| 522 | 526 |
| 523 // The mailbox used by texture_layer_. | 527 // The mailbox used by texture_layer_. |
| 524 cc::TextureMailbox mailbox_; | 528 cc::TextureMailbox mailbox_; |
| 525 | 529 |
| 526 // The callback to release the mailbox. This is only set after | 530 // The callback to release the mailbox. This is only set after |
| 527 // SetTextureMailbox is called, before we give it to the TextureLayer. | 531 // SetTextureMailbox is called, before we give it to the TextureLayer. |
| 528 scoped_ptr<cc::SingleReleaseCallback> mailbox_release_callback_; | 532 scoped_ptr<cc::SingleReleaseCallback> mailbox_release_callback_; |
| 529 | 533 |
| 530 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 534 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 531 // or SetTextureMailbox was called. | 535 // or SetTextureMailbox was called. |
| 532 gfx::Size frame_size_in_dip_; | 536 gfx::Size frame_size_in_dip_; |
| 533 | 537 |
| 534 DISALLOW_COPY_AND_ASSIGN(Layer); | 538 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 535 }; | 539 }; |
| 536 | 540 |
| 537 } // namespace ui | 541 } // namespace ui |
| 538 | 542 |
| 539 #endif // UI_COMPOSITOR_LAYER_H_ | 543 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |