| Index: cc/trees/occlusion_tracker_unittest.cc
|
| diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc
|
| index 3c6c4403690d8bd11b0484b05bc5168bdb5af1a0..b35e437bd3a955467c2ffe1ca9df32403470c54c 100644
|
| --- a/cc/trees/occlusion_tracker_unittest.cc
|
| +++ b/cc/trees/occlusion_tracker_unittest.cc
|
| @@ -121,8 +121,13 @@
|
| return make_scoped_refptr(new ContentLayerType());
|
| }
|
|
|
| - template <typename T>
|
| - static LayerPtrType PassLayerPtr(T* layer) {
|
| + static LayerPtrType PassLayerPtr(ContentLayerPtrType* layer) {
|
| + LayerPtrType ref(*layer);
|
| + *layer = NULL;
|
| + return ref;
|
| + }
|
| +
|
| + static LayerPtrType PassLayerPtr(LayerPtrType* layer) {
|
| LayerPtrType ref(*layer);
|
| *layer = NULL;
|
| return ref;
|
| @@ -151,9 +156,12 @@
|
| }
|
| static int next_layer_impl_id;
|
|
|
| - template <typename T>
|
| - static LayerPtrType PassLayerPtr(T* layer) {
|
| + static LayerPtrType PassLayerPtr(LayerPtrType* layer) {
|
| return layer->Pass();
|
| + }
|
| +
|
| + static LayerPtrType PassLayerPtr(ContentLayerPtrType* layer) {
|
| + return layer->PassAs<LayerType>();
|
| }
|
|
|
| static void DestroyLayer(LayerPtrType* layer) { layer->reset(); }
|
| @@ -278,7 +286,7 @@
|
|
|
| void DestroyLayers() {
|
| Types::DestroyLayer(&root_);
|
| - render_surface_layer_list_ = nullptr;
|
| + render_surface_layer_list_.reset();
|
| render_surface_layer_list_impl_.clear();
|
| replica_layers_.clear();
|
| mask_layers_.clear();
|
|
|