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 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 const Region* FakePictureLayerTilingClient::GetPendingInvalidation() { | 59 const Region* FakePictureLayerTilingClient::GetPendingInvalidation() { |
60 return &invalidation_; | 60 return &invalidation_; |
61 } | 61 } |
62 | 62 |
63 const PictureLayerTiling* | 63 const PictureLayerTiling* |
64 FakePictureLayerTilingClient::GetPendingOrActiveTwinTiling( | 64 FakePictureLayerTilingClient::GetPendingOrActiveTwinTiling( |
65 const PictureLayerTiling* tiling) const { | 65 const PictureLayerTiling* tiling) const { |
66 if (!twin_set_) | 66 if (!twin_set_) |
67 return twin_tiling_; | 67 return twin_tiling_; |
68 for (size_t i = 0; i < twin_set_->num_tilings(); ++i) { | 68 for (size_t i = 0; i < twin_set_->num_tilings(); ++i) { |
69 if (twin_set_->tiling_at(i)->contents_scale() == tiling->contents_scale()) | 69 if (twin_set_->tiling_at(i)->raster_transform() == |
| 70 tiling->raster_transform()) |
70 return twin_set_->tiling_at(i); | 71 return twin_set_->tiling_at(i); |
71 } | 72 } |
72 return nullptr; | 73 return nullptr; |
73 } | 74 } |
74 | 75 |
75 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { | 76 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { |
76 return false; | 77 return false; |
77 } | 78 } |
78 | 79 |
79 } // namespace cc | 80 } // namespace cc |
OLD | NEW |