| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.h" | 5 #include "cc/test/fake_picture_pile.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "cc/test/fake_picture_pile_impl.h" | 9 #include "cc/test/fake_picture_pile_impl.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 EXPECT_FALSE(HasRecordingAt(x, y)); | 86 EXPECT_FALSE(HasRecordingAt(x, y)); |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool FakePicturePile::HasRecordingAt(int x, int y) const { | 89 bool FakePicturePile::HasRecordingAt(int x, int y) const { |
| 90 PictureMap::const_iterator found = picture_map_.find(PictureMapKey(x, y)); | 90 PictureMap::const_iterator found = picture_map_.find(PictureMapKey(x, y)); |
| 91 if (found == picture_map_.end()) | 91 if (found == picture_map_.end()) |
| 92 return false; | 92 return false; |
| 93 return !!found->second.GetPicture(); | 93 return !!found->second.GetPicture(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void FakePicturePile::RerecordPile() { | 96 void FakePicturePile::Rerecord() { |
| 97 for (int y = 0; y < num_tiles_y(); ++y) { | 97 for (int y = 0; y < num_tiles_y(); ++y) { |
| 98 for (int x = 0; x < num_tiles_x(); ++x) { | 98 for (int x = 0; x < num_tiles_x(); ++x) { |
| 99 RemoveRecordingAt(x, y); | 99 RemoveRecordingAt(x, y); |
| 100 AddRecordingAt(x, y); | 100 AddRecordingAt(x, y); |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace cc | 105 } // namespace cc |
| OLD | NEW |