| 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_pile_impl.h" | 5 #include "cc/test/fake_picture_pile_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "cc/test/impl_side_painting_settings.h" | 10 #include "cc/test/impl_side_painting_settings.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 pile->recorded_viewport_ = gfx::Rect(); | 56 pile->recorded_viewport_ = gfx::Rect(); |
| 57 pile->has_any_recordings_ = true; | 57 pile->has_any_recordings_ = true; |
| 58 return pile; | 58 return pile; |
| 59 } | 59 } |
| 60 | 60 |
| 61 scoped_refptr<FakePicturePileImpl> | 61 scoped_refptr<FakePicturePileImpl> |
| 62 FakePicturePileImpl::CreateInfiniteFilledPile() { | 62 FakePicturePileImpl::CreateInfiniteFilledPile() { |
| 63 scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl()); | 63 scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl()); |
| 64 gfx::Size size(std::numeric_limits<int>::max(), | 64 gfx::Size size(std::numeric_limits<int>::max(), |
| 65 std::numeric_limits<int>::max()); | 65 std::numeric_limits<int>::max()); |
| 66 pile->SetTilingRect(gfx::Rect(size)); | 66 pile->tiling().SetTilingRect(gfx::Rect(size)); |
| 67 pile->tiling().SetTilingRect(gfx::Rect(size)); | 67 pile->tiling().SetTilingRect(gfx::Rect(size)); |
| 68 pile->tiling().SetMaxTextureSize(size); | 68 pile->tiling().SetMaxTextureSize(size); |
| 69 pile->SetTileGridSize(size); | 69 pile->SetTileGridSize(size); |
| 70 pile->recorded_viewport_ = gfx::Rect(size); | 70 pile->recorded_viewport_ = gfx::Rect(size); |
| 71 pile->has_any_recordings_ = true; | 71 pile->has_any_recordings_ = true; |
| 72 pile->AddRecordingAt(0, 0); | 72 pile->AddRecordingAt(0, 0); |
| 73 return pile; | 73 return pile; |
| 74 } | 74 } |
| 75 | 75 |
| 76 void FakePicturePileImpl::AddRecordingAt(int x, int y) { | 76 void FakePicturePileImpl::AddRecordingAt(int x, int y) { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 107 void FakePicturePileImpl::RerecordPile() { | 107 void FakePicturePileImpl::RerecordPile() { |
| 108 for (int y = 0; y < num_tiles_y(); ++y) { | 108 for (int y = 0; y < num_tiles_y(); ++y) { |
| 109 for (int x = 0; x < num_tiles_x(); ++x) { | 109 for (int x = 0; x < num_tiles_x(); ++x) { |
| 110 RemoveRecordingAt(x, y); | 110 RemoveRecordingAt(x, y); |
| 111 AddRecordingAt(x, y); | 111 AddRecordingAt(x, y); |
| 112 } | 112 } |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace cc | 116 } // namespace cc |
| OLD | NEW |