| 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/resources/picture_layer_tiling.h" | 5 #include "cc/resources/picture_layer_tiling.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 float contents_scale, | 55 float contents_scale, |
| 56 const gfx::Size& layer_bounds, | 56 const gfx::Size& layer_bounds, |
| 57 PictureLayerTilingClient* client) { | 57 PictureLayerTilingClient* client) { |
| 58 return make_scoped_ptr(new TestablePictureLayerTiling( | 58 return make_scoped_ptr(new TestablePictureLayerTiling( |
| 59 contents_scale, | 59 contents_scale, |
| 60 layer_bounds, | 60 layer_bounds, |
| 61 client)); | 61 client)); |
| 62 } | 62 } |
| 63 | 63 |
| 64 gfx::Rect live_tiles_rect() const { return live_tiles_rect_; } | 64 gfx::Rect live_tiles_rect() const { return live_tiles_rect_; } |
| 65 bool eviction_tiles_cache_valid() const { | |
| 66 return eviction_tiles_cache_valid_; | |
| 67 } | |
| 68 | 65 |
| 69 using PictureLayerTiling::ComputeSkewport; | 66 using PictureLayerTiling::ComputeSkewport; |
| 70 using PictureLayerTiling::RemoveTileAt; | 67 using PictureLayerTiling::RemoveTileAt; |
| 71 | 68 |
| 72 protected: | 69 protected: |
| 73 TestablePictureLayerTiling(float contents_scale, | 70 TestablePictureLayerTiling(float contents_scale, |
| 74 const gfx::Size& layer_bounds, | 71 const gfx::Size& layer_bounds, |
| 75 PictureLayerTilingClient* client) | 72 PictureLayerTilingClient* client) |
| 76 : PictureLayerTiling(contents_scale, layer_bounds, client) { } | 73 : PictureLayerTiling(contents_scale, layer_bounds, client) { } |
| 77 }; | 74 }; |
| (...skipping 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2052 tiling_->Resize(gfx::Size(250, 150)); | 2049 tiling_->Resize(gfx::Size(250, 150)); |
| 2053 | 2050 |
| 2054 // Tile size in the tiling should be resized to 250x200. | 2051 // Tile size in the tiling should be resized to 250x200. |
| 2055 EXPECT_EQ(250, tiling_->TilingDataForTesting().max_texture_size().width()); | 2052 EXPECT_EQ(250, tiling_->TilingDataForTesting().max_texture_size().width()); |
| 2056 EXPECT_EQ(200, tiling_->TilingDataForTesting().max_texture_size().height()); | 2053 EXPECT_EQ(200, tiling_->TilingDataForTesting().max_texture_size().height()); |
| 2057 EXPECT_EQ(0u, tiling_->AllRefTilesForTesting().size()); | 2054 EXPECT_EQ(0u, tiling_->AllRefTilesForTesting().size()); |
| 2058 } | 2055 } |
| 2059 | 2056 |
| 2060 } // namespace | 2057 } // namespace |
| 2061 } // namespace cc | 2058 } // namespace cc |
| OLD | NEW |