| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_picture_layer_impl.h" | 5 #include "cc/test/fake_picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 #include "cc/resources/tile.h" | 8 #include "cc/resources/tile.h" |
| 9 #include "cc/trees/layer_tree_impl.h" | 9 #include "cc/trees/layer_tree_impl.h" |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 release_resources_count_(0) { | 48 release_resources_count_(0) { |
| 49 } | 49 } |
| 50 | 50 |
| 51 scoped_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl( | 51 scoped_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl( |
| 52 LayerTreeImpl* tree_impl) { | 52 LayerTreeImpl* tree_impl) { |
| 53 return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id())); | 53 return make_scoped_ptr(new FakePictureLayerImpl(tree_impl, id())); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void FakePictureLayerImpl::AppendQuads( | 56 void FakePictureLayerImpl::AppendQuads( |
| 57 RenderPass* render_pass, | 57 RenderPass* render_pass, |
| 58 const OcclusionTracker<LayerImpl>& occlusion_tracker, | 58 const Occlusion& occlusion_in_content_space, |
| 59 AppendQuadsData* append_quads_data) { | 59 AppendQuadsData* append_quads_data) { |
| 60 PictureLayerImpl::AppendQuads( | 60 PictureLayerImpl::AppendQuads( |
| 61 render_pass, occlusion_tracker, append_quads_data); | 61 render_pass, occlusion_in_content_space, append_quads_data); |
| 62 ++append_quads_count_; | 62 ++append_quads_count_; |
| 63 } | 63 } |
| 64 | 64 |
| 65 gfx::Size FakePictureLayerImpl::CalculateTileSize( | 65 gfx::Size FakePictureLayerImpl::CalculateTileSize( |
| 66 const gfx::Size& content_bounds) const { | 66 const gfx::Size& content_bounds) const { |
| 67 if (fixed_tile_size_.IsEmpty()) { | 67 if (fixed_tile_size_.IsEmpty()) { |
| 68 return PictureLayerImpl::CalculateTileSize(content_bounds); | 68 return PictureLayerImpl::CalculateTileSize(content_bounds); |
| 69 } | 69 } |
| 70 | 70 |
| 71 return fixed_tile_size_; | 71 return fixed_tile_size_; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 ? has_valid_tile_priorities_ | 179 ? has_valid_tile_priorities_ |
| 180 : PictureLayerImpl::HasValidTilePriorities(); | 180 : PictureLayerImpl::HasValidTilePriorities(); |
| 181 } | 181 } |
| 182 | 182 |
| 183 void FakePictureLayerImpl::ReleaseResources() { | 183 void FakePictureLayerImpl::ReleaseResources() { |
| 184 PictureLayerImpl::ReleaseResources(); | 184 PictureLayerImpl::ReleaseResources(); |
| 185 ++release_resources_count_; | 185 ++release_resources_count_; |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace cc | 188 } // namespace cc |
| OLD | NEW |