| 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_picture_layer_tiling_client.h" | 5 #include "cc/test/fake_picture_layer_tiling_client.h" |
| 6 | 6 |
| 7 namespace cc { | 7 namespace cc { |
| 8 | 8 |
| 9 class FakeInfinitePicturePileImpl : public PicturePileImpl { | 9 class FakeInfinitePicturePileImpl : public PicturePileImpl { |
| 10 public: | 10 public: |
| 11 FakeInfinitePicturePileImpl() { | 11 FakeInfinitePicturePileImpl() { |
| 12 gfx::Size size(std::numeric_limits<int>::max(), | 12 gfx::Size size(std::numeric_limits<int>::max(), |
| 13 std::numeric_limits<int>::max()); | 13 std::numeric_limits<int>::max()); |
| 14 Resize(size); | 14 Resize(size); |
| 15 recorded_region_ = Region(gfx::Rect(size)); | 15 recorded_region_ = Region(gfx::Rect(size)); |
| 16 } | 16 } |
| 17 | 17 |
| 18 protected: | 18 protected: |
| 19 virtual ~FakeInfinitePicturePileImpl() {} | 19 virtual ~FakeInfinitePicturePileImpl() {} |
| 20 }; | 20 }; |
| 21 | 21 |
| 22 FakePictureLayerTilingClient::FakePictureLayerTilingClient() | 22 FakePictureLayerTilingClient::FakePictureLayerTilingClient() |
| 23 : tile_manager_(&tile_manager_client_, NULL, 1, false, false, false), | 23 : rendering_stats_instrumentation_(RenderingStatsInstrumentation::Create()), |
| 24 tile_manager_(&tile_manager_client_, |
| 25 NULL, |
| 26 1, |
| 27 false, |
| 28 false, |
| 29 false, |
| 30 rendering_stats_instrumentation_.get()), |
| 24 pile_(new FakeInfinitePicturePileImpl()) { | 31 pile_(new FakeInfinitePicturePileImpl()) { |
| 25 } | 32 } |
| 26 | 33 |
| 27 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { | 34 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { |
| 28 } | 35 } |
| 29 | 36 |
| 30 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( | 37 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( |
| 31 PictureLayerTiling*, | 38 PictureLayerTiling*, |
| 32 gfx::Rect rect) { | 39 gfx::Rect rect) { |
| 33 return make_scoped_refptr(new Tile(&tile_manager_, | 40 return make_scoped_refptr(new Tile(&tile_manager_, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 44 tile_size_ = tile_size; | 51 tile_size_ = tile_size; |
| 45 } | 52 } |
| 46 | 53 |
| 47 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( | 54 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( |
| 48 gfx::Size /* current_tile_size */, | 55 gfx::Size /* current_tile_size */, |
| 49 gfx::Size /* content_bounds */) { | 56 gfx::Size /* content_bounds */) { |
| 50 return tile_size_; | 57 return tile_size_; |
| 51 } | 58 } |
| 52 | 59 |
| 53 } // namespace cc | 60 } // namespace cc |
| OLD | NEW |