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