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

Side by Side Diff: cc/layers/layer_impl.h

Issue 14060015: cc: Async readback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 CC_LAYERS_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector>
9 10
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "base/values.h" 13 #include "base/values.h"
13 #include "cc/animation/layer_animation_controller.h" 14 #include "cc/animation/layer_animation_controller.h"
14 #include "cc/animation/layer_animation_value_observer.h" 15 #include "cc/animation/layer_animation_value_observer.h"
15 #include "cc/base/cc_export.h" 16 #include "cc/base/cc_export.h"
16 #include "cc/base/region.h" 17 #include "cc/base/region.h"
17 #include "cc/base/scoped_ptr_vector.h" 18 #include "cc/base/scoped_ptr_vector.h"
18 #include "cc/input/input_handler.h" 19 #include "cc/input/input_handler.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 const LayerImpl* parent() const { return parent_; } 69 const LayerImpl* parent() const { return parent_; }
69 const OwnedLayerImplList& children() const { return children_; } 70 const OwnedLayerImplList& children() const { return children_; }
70 OwnedLayerImplList& children() { return children_; } 71 OwnedLayerImplList& children() { return children_; }
71 LayerImpl* child_at(size_t index) const { return children_[index]; } 72 LayerImpl* child_at(size_t index) const { return children_[index]; }
72 void AddChild(scoped_ptr<LayerImpl> child); 73 void AddChild(scoped_ptr<LayerImpl> child);
73 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child); 74 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child);
74 void set_parent(LayerImpl* parent) { parent_ = parent; } 75 void set_parent(LayerImpl* parent) { parent_ = parent; }
75 // Warning: This does not preserve tree structure invariants. 76 // Warning: This does not preserve tree structure invariants.
76 void ClearChildList(); 77 void ClearChildList();
77 78
79 void PassRequestCopyCallbacks(
80 std::vector<RenderPass::RequestCopyAsBitmapCallback>* callbacks);
81 void TakeRequestCopyCallbacks(
82 std::vector<RenderPass::RequestCopyAsBitmapCallback>* callbacks);
83 bool HasRequestCopyCallback() const {
84 return !request_copy_callbacks_.empty();
85 }
86
78 void SetMaskLayer(scoped_ptr<LayerImpl> mask_layer); 87 void SetMaskLayer(scoped_ptr<LayerImpl> mask_layer);
79 LayerImpl* mask_layer() { return mask_layer_.get(); } 88 LayerImpl* mask_layer() { return mask_layer_.get(); }
80 const LayerImpl* mask_layer() const { return mask_layer_.get(); } 89 const LayerImpl* mask_layer() const { return mask_layer_.get(); }
81 scoped_ptr<LayerImpl> TakeMaskLayer(); 90 scoped_ptr<LayerImpl> TakeMaskLayer();
82 91
83 void SetReplicaLayer(scoped_ptr<LayerImpl> replica_layer); 92 void SetReplicaLayer(scoped_ptr<LayerImpl> replica_layer);
84 LayerImpl* replica_layer() { return replica_layer_.get(); } 93 LayerImpl* replica_layer() { return replica_layer_.get(); }
85 const LayerImpl* replica_layer() const { return replica_layer_.get(); } 94 const LayerImpl* replica_layer() const { return replica_layer_.get(); }
86 scoped_ptr<LayerImpl> TakeReplicaLayer(); 95 scoped_ptr<LayerImpl> TakeReplicaLayer();
87 96
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 scoped_refptr<LayerAnimationController> layer_animation_controller_; 531 scoped_refptr<LayerAnimationController> layer_animation_controller_;
523 532
524 // Manages scrollbars for this layer 533 // Manages scrollbars for this layer
525 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; 534 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_;
526 535
527 // Weak pointers to this layer's scrollbars, if it has them. Updated during 536 // Weak pointers to this layer's scrollbars, if it has them. Updated during
528 // tree synchronization. 537 // tree synchronization.
529 ScrollbarLayerImpl* horizontal_scrollbar_layer_; 538 ScrollbarLayerImpl* horizontal_scrollbar_layer_;
530 ScrollbarLayerImpl* vertical_scrollbar_layer_; 539 ScrollbarLayerImpl* vertical_scrollbar_layer_;
531 540
541 std::vector<RenderPass::RequestCopyAsBitmapCallback> request_copy_callbacks_;
542
532 // Group of properties that need to be computed based on the layer tree 543 // Group of properties that need to be computed based on the layer tree
533 // hierarchy before layers can be drawn. 544 // hierarchy before layers can be drawn.
534 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; 545 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_;
535 546
536 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 547 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
537 }; 548 };
538 549
539 } // namespace cc 550 } // namespace cc
540 551
541 #endif // CC_LAYERS_LAYER_IMPL_H_ 552 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698