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

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

Issue 186123006: zero copy - NOT FOR REVIEW Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: re-upload Created 6 years, 9 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
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "cc/animation/animation_events.h" 15 #include "cc/animation/animation_events.h"
16 #include "cc/animation/layer_animation_event_observer.h" 16 #include "cc/animation/layer_animation_event_observer.h"
17 #include "cc/base/scoped_ptr_vector.h" 17 #include "cc/base/scoped_ptr_vector.h"
18 #include "cc/layers/content_layer_client.h" 18 #include "cc/layers/content_layer_client.h"
19 #include "cc/layers/layer_client.h" 19 #include "cc/layers/layer_client.h"
20 #include "cc/layers/picture_layer.h"
20 #include "cc/layers/texture_layer_client.h" 21 #include "cc/layers/texture_layer_client.h"
21 #include "cc/resources/texture_mailbox.h" 22 #include "cc/resources/texture_mailbox.h"
22 #include "third_party/skia/include/core/SkColor.h" 23 #include "third_party/skia/include/core/SkColor.h"
23 #include "third_party/skia/include/core/SkRegion.h" 24 #include "third_party/skia/include/core/SkRegion.h"
24 #include "ui/compositor/compositor.h" 25 #include "ui/compositor/compositor.h"
25 #include "ui/compositor/layer_animation_delegate.h" 26 #include "ui/compositor/layer_animation_delegate.h"
26 #include "ui/compositor/layer_delegate.h" 27 #include "ui/compositor/layer_delegate.h"
27 #include "ui/compositor/layer_type.h" 28 #include "ui/compositor/layer_type.h"
28 #include "ui/gfx/rect.h" 29 #include "ui/gfx/rect.h"
29 #include "ui/gfx/transform.h" 30 #include "ui/gfx/transform.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 LayerDelegate* delegate_; 451 LayerDelegate* delegate_;
451 452
452 scoped_refptr<LayerAnimator> animator_; 453 scoped_refptr<LayerAnimator> animator_;
453 454
454 // Animations that are passed to AddThreadedAnimation before this layer is 455 // Animations that are passed to AddThreadedAnimation before this layer is
455 // added to a tree. 456 // added to a tree.
456 cc::ScopedPtrVector<cc::Animation> pending_threaded_animations_; 457 cc::ScopedPtrVector<cc::Animation> pending_threaded_animations_;
457 458
458 // Ownership of the layer is held through one of the strongly typed layer 459 // Ownership of the layer is held through one of the strongly typed layer
459 // pointers, depending on which sort of layer this is. 460 // pointers, depending on which sort of layer this is.
460 scoped_refptr<cc::ContentLayer> content_layer_; 461 scoped_refptr<cc::Layer> content_layer_;
reveman 2014/03/07 19:35:13 Let's move this and layer.cc changes into a separa
461 scoped_refptr<cc::TextureLayer> texture_layer_; 462 scoped_refptr<cc::TextureLayer> texture_layer_;
462 scoped_refptr<cc::SolidColorLayer> solid_color_layer_; 463 scoped_refptr<cc::SolidColorLayer> solid_color_layer_;
463 scoped_refptr<cc::DelegatedRendererLayer> delegated_renderer_layer_; 464 scoped_refptr<cc::DelegatedRendererLayer> delegated_renderer_layer_;
464 cc::Layer* cc_layer_; 465 cc::Layer* cc_layer_;
465 466
466 // If true, the layer scales the canvas and the texture with the device scale 467 // If true, the layer scales the canvas and the texture with the device scale
467 // factor as apporpriate. When true, the texture size is in DIP. 468 // factor as apporpriate. When true, the texture size is in DIP.
468 bool scale_content_; 469 bool scale_content_;
469 470
470 // A cached copy of |Compositor::device_scale_factor()|. 471 // A cached copy of |Compositor::device_scale_factor()|.
471 float device_scale_factor_; 472 float device_scale_factor_;
472 473
473 // A cached copy of the TextureMailbox given texture_layer_. 474 // A cached copy of the TextureMailbox given texture_layer_.
474 cc::TextureMailbox mailbox_; 475 cc::TextureMailbox mailbox_;
475 476
476 // Device scale factor in which mailbox_ was rendered in. 477 // Device scale factor in which mailbox_ was rendered in.
477 float mailbox_scale_factor_; 478 float mailbox_scale_factor_;
478 479
479 // The size of the delegated frame in DIP, set when SetShowDelegatedContent 480 // The size of the delegated frame in DIP, set when SetShowDelegatedContent
480 // was called. 481 // was called.
481 gfx::Size delegated_frame_size_in_dip_; 482 gfx::Size delegated_frame_size_in_dip_;
482 483
483 DISALLOW_COPY_AND_ASSIGN(Layer); 484 DISALLOW_COPY_AND_ASSIGN(Layer);
484 }; 485 };
485 486
486 } // namespace ui 487 } // namespace ui
487 488
488 #endif // UI_COMPOSITOR_LAYER_H_ 489 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698