Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(702)

Side by Side Diff: ui/compositor/layer.h

Issue 1588093004: Compute if a layer is drawn without LayerTree hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 scoped_refptr<cc::Layer> content_layer_; 509 scoped_refptr<cc::Layer> content_layer_;
510 scoped_refptr<cc::NinePatchLayer> nine_patch_layer_; 510 scoped_refptr<cc::NinePatchLayer> nine_patch_layer_;
511 scoped_refptr<cc::TextureLayer> texture_layer_; 511 scoped_refptr<cc::TextureLayer> texture_layer_;
512 scoped_refptr<cc::SolidColorLayer> solid_color_layer_; 512 scoped_refptr<cc::SolidColorLayer> solid_color_layer_;
513 scoped_refptr<cc::DelegatedRendererLayer> delegated_renderer_layer_; 513 scoped_refptr<cc::DelegatedRendererLayer> delegated_renderer_layer_;
514 scoped_refptr<cc::SurfaceLayer> surface_layer_; 514 scoped_refptr<cc::SurfaceLayer> surface_layer_;
515 cc::Layer* cc_layer_; 515 cc::Layer* cc_layer_;
516 516
517 // A cached copy of |Compositor::device_scale_factor()|. 517 // A cached copy of |Compositor::device_scale_factor()|.
518 float device_scale_factor_; 518 float device_scale_factor_;
519 // When a layer become invisible, we make the corresponding cc_layer
520 // transparent (opacity = 0) and cache its actual opacity value. This is used
521 // to set it back when the layer becomes visible.
522 float cached_cc_layer_opacity_;
519 523
520 // A cached copy of the nine patch layer's image and aperture. 524 // A cached copy of the nine patch layer's image and aperture.
521 // These are required for device scale factor change. 525 // These are required for device scale factor change.
522 gfx::ImageSkia nine_patch_layer_image_; 526 gfx::ImageSkia nine_patch_layer_image_;
523 gfx::Rect nine_patch_layer_aperture_; 527 gfx::Rect nine_patch_layer_aperture_;
524 528
525 // The mailbox used by texture_layer_. 529 // The mailbox used by texture_layer_.
526 cc::TextureMailbox mailbox_; 530 cc::TextureMailbox mailbox_;
527 531
528 // The callback to release the mailbox. This is only set after 532 // The callback to release the mailbox. This is only set after
529 // SetTextureMailbox is called, before we give it to the TextureLayer. 533 // SetTextureMailbox is called, before we give it to the TextureLayer.
530 scoped_ptr<cc::SingleReleaseCallback> mailbox_release_callback_; 534 scoped_ptr<cc::SingleReleaseCallback> mailbox_release_callback_;
531 535
532 // The size of the frame or texture in DIP, set when SetShowDelegatedContent 536 // The size of the frame or texture in DIP, set when SetShowDelegatedContent
533 // or SetTextureMailbox was called. 537 // or SetTextureMailbox was called.
534 gfx::Size frame_size_in_dip_; 538 gfx::Size frame_size_in_dip_;
535 539
536 DISALLOW_COPY_AND_ASSIGN(Layer); 540 DISALLOW_COPY_AND_ASSIGN(Layer);
537 }; 541 };
538 542
539 } // namespace ui 543 } // namespace ui
540 544
541 #endif // UI_COMPOSITOR_LAYER_H_ 545 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698