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

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

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (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 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 void SetMaskLayer(scoped_ptr<LayerImpl> mask_layer); 237 void SetMaskLayer(scoped_ptr<LayerImpl> mask_layer);
238 LayerImpl* mask_layer() { return mask_layer_.get(); } 238 LayerImpl* mask_layer() { return mask_layer_.get(); }
239 const LayerImpl* mask_layer() const { return mask_layer_.get(); } 239 const LayerImpl* mask_layer() const { return mask_layer_.get(); }
240 scoped_ptr<LayerImpl> TakeMaskLayer(); 240 scoped_ptr<LayerImpl> TakeMaskLayer();
241 241
242 void SetReplicaLayer(scoped_ptr<LayerImpl> replica_layer); 242 void SetReplicaLayer(scoped_ptr<LayerImpl> replica_layer);
243 LayerImpl* replica_layer() { return replica_layer_.get(); } 243 LayerImpl* replica_layer() { return replica_layer_.get(); }
244 const LayerImpl* replica_layer() const { return replica_layer_.get(); } 244 const LayerImpl* replica_layer() const { return replica_layer_.get(); }
245 scoped_ptr<LayerImpl> TakeReplicaLayer(); 245 scoped_ptr<LayerImpl> TakeReplicaLayer();
246 246
247 bool has_mask() const { return mask_layer_; } 247 bool has_mask() const { return !!mask_layer_; }
248 bool has_replica() const { return replica_layer_; } 248 bool has_replica() const { return !!replica_layer_; }
249 bool replica_has_mask() const { 249 bool replica_has_mask() const {
250 return replica_layer_ && (mask_layer_ || replica_layer_->mask_layer_); 250 return replica_layer_ && (mask_layer_ || replica_layer_->mask_layer_);
251 } 251 }
252 252
253 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } 253 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; }
254 254
255 void PopulateSharedQuadState(SharedQuadState* state) const; 255 void PopulateSharedQuadState(SharedQuadState* state) const;
256 void PopulateScaledSharedQuadState(SharedQuadState* state, float scale) const; 256 void PopulateScaledSharedQuadState(SharedQuadState* state, float scale) const;
257 // WillDraw must be called before AppendQuads. If WillDraw returns false, 257 // WillDraw must be called before AppendQuads. If WillDraw returns false,
258 // AppendQuads and DidDraw will not be called. If WillDraw returns true, 258 // AppendQuads and DidDraw will not be called. If WillDraw returns true,
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 bool layer_or_descendant_has_input_handler_; 896 bool layer_or_descendant_has_input_handler_;
897 bool sorted_for_recursion_; 897 bool sorted_for_recursion_;
898 bool is_hidden_from_property_trees_; 898 bool is_hidden_from_property_trees_;
899 899
900 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 900 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
901 }; 901 };
902 902
903 } // namespace cc 903 } // namespace cc
904 904
905 #endif // CC_LAYERS_LAYER_IMPL_H_ 905 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698