| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "cc/test/fake_content_layer_impl.h" | 5 #include "cc/test/fake_content_layer_impl.h" |
| 6 | 6 |
| 7 namespace cc { | 7 namespace cc { |
| 8 | 8 |
| 9 FakeContentLayerImpl::FakeContentLayerImpl(LayerTreeImpl* tree_impl, int id) | 9 FakeContentLayerImpl::FakeContentLayerImpl(LayerTreeImpl* tree_impl, int id) |
| 10 : TiledLayerImpl(tree_impl, id), lost_output_surface_count_(0) { | 10 : TiledLayerImpl(tree_impl, id), lost_output_surface_count_(0) { |
| 11 } | 11 } |
| 12 | 12 |
| 13 FakeContentLayerImpl::~FakeContentLayerImpl() {} | 13 FakeContentLayerImpl::~FakeContentLayerImpl() {} |
| 14 | 14 |
| 15 scoped_ptr<LayerImpl> FakeContentLayerImpl::CreateLayerImpl( | 15 scoped_ptr<LayerImpl> FakeContentLayerImpl::CreateLayerImpl( |
| 16 LayerTreeImpl* tree_impl) { | 16 LayerTreeImpl* tree_impl) { |
| 17 return FakeContentLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); | 17 return FakeContentLayerImpl::Create(tree_impl, id()); |
| 18 } | 18 } |
| 19 | 19 |
| 20 bool FakeContentLayerImpl::HaveResourceForTileAt(int i, int j) { | 20 bool FakeContentLayerImpl::HaveResourceForTileAt(int i, int j) { |
| 21 return HasResourceIdForTileAt(i, j); | 21 return HasResourceIdForTileAt(i, j); |
| 22 } | 22 } |
| 23 | 23 |
| 24 void FakeContentLayerImpl::ReleaseResources() { | 24 void FakeContentLayerImpl::ReleaseResources() { |
| 25 TiledLayerImpl::ReleaseResources(); | 25 TiledLayerImpl::ReleaseResources(); |
| 26 ++lost_output_surface_count_; | 26 ++lost_output_surface_count_; |
| 27 } | 27 } |
| 28 | 28 |
| 29 } // namespace cc | 29 } // namespace cc |
| OLD | NEW |