| 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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 rects_.push_back(rect); | 76 rects_.push_back(rect); |
| 77 } | 77 } |
| 78 | 78 |
| 79 std::vector<SkRect> rects_; | 79 std::vector<SkRect> rects_; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 class PictureLayerImplTestSettings : public GpuRasterizationEnabledSettings { | 82 class PictureLayerImplTestSettings : public GpuRasterizationEnabledSettings { |
| 83 public: | 83 public: |
| 84 PictureLayerImplTestSettings() { | 84 PictureLayerImplTestSettings() { |
| 85 layer_transforms_should_scale_layer_contents = true; | 85 layer_transforms_should_scale_layer_contents = true; |
| 86 verify_clip_tree_calculations = true; |
| 86 } | 87 } |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 class NoLowResTilingsSettings : public PictureLayerImplTestSettings {}; | 90 class NoLowResTilingsSettings : public PictureLayerImplTestSettings {}; |
| 90 | 91 |
| 91 class LowResTilingsSettings : public PictureLayerImplTestSettings { | 92 class LowResTilingsSettings : public PictureLayerImplTestSettings { |
| 92 public: | 93 public: |
| 93 LowResTilingsSettings() { create_low_res_tiling = true; } | 94 LowResTilingsSettings() { create_low_res_tiling = true; } |
| 94 }; | 95 }; |
| 95 | 96 |
| (...skipping 4795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4891 // New low res tiling. | 4892 // New low res tiling. |
| 4892 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); | 4893 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); |
| 4893 | 4894 |
| 4894 // This tiling will be high res now, it won't contain low res content since it | 4895 // This tiling will be high res now, it won't contain low res content since it |
| 4895 // was all destroyed. | 4896 // was all destroyed. |
| 4896 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); | 4897 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); |
| 4897 } | 4898 } |
| 4898 | 4899 |
| 4899 } // namespace | 4900 } // namespace |
| 4900 } // namespace cc | 4901 } // namespace cc |
| OLD | NEW |