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 <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <limits> | 9 #include <limits> |
10 #include <set> | 10 #include <set> |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 client)); | 72 client)); |
73 } | 73 } |
74 | 74 |
75 PictureLayerTiling::PictureLayerTiling(float contents_scale, | 75 PictureLayerTiling::PictureLayerTiling(float contents_scale, |
76 const gfx::Size& layer_bounds, | 76 const gfx::Size& layer_bounds, |
77 PictureLayerTilingClient* client) | 77 PictureLayerTilingClient* client) |
78 : contents_scale_(contents_scale), | 78 : contents_scale_(contents_scale), |
79 layer_bounds_(layer_bounds), | 79 layer_bounds_(layer_bounds), |
80 resolution_(NON_IDEAL_RESOLUTION), | 80 resolution_(NON_IDEAL_RESOLUTION), |
81 client_(client), | 81 client_(client), |
82 tiling_data_(gfx::Size(), gfx::Size(), true), | 82 tiling_data_(gfx::Size(), gfx::Size(), kBorderTexels), |
83 last_impl_frame_time_in_seconds_(0.0), | 83 last_impl_frame_time_in_seconds_(0.0), |
84 has_visible_rect_tiles_(false), | 84 has_visible_rect_tiles_(false), |
85 has_skewport_rect_tiles_(false), | 85 has_skewport_rect_tiles_(false), |
86 has_soon_border_rect_tiles_(false), | 86 has_soon_border_rect_tiles_(false), |
87 has_eventually_rect_tiles_(false), | 87 has_eventually_rect_tiles_(false), |
88 eviction_tiles_cache_valid_(false), | 88 eviction_tiles_cache_valid_(false), |
89 eviction_cache_tree_priority_(SAME_PRIORITY_FOR_BOTH_TREES) { | 89 eviction_cache_tree_priority_(SAME_PRIORITY_FOR_BOTH_TREES) { |
90 gfx::Size content_bounds = | 90 gfx::Size content_bounds = |
91 gfx::ToCeiledSize(gfx::ScaleSize(layer_bounds, contents_scale)); | 91 gfx::ToCeiledSize(gfx::ScaleSize(layer_bounds, contents_scale)); |
92 gfx::Size tile_size = client_->CalculateTileSize(content_bounds); | 92 gfx::Size tile_size = client_->CalculateTileSize(content_bounds); |
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 DCHECK(*this); | 1191 DCHECK(*this); |
1192 do { | 1192 do { |
1193 ++current_eviction_tiles_index_; | 1193 ++current_eviction_tiles_index_; |
1194 } while (current_eviction_tiles_index_ != eviction_tiles_->size() && | 1194 } while (current_eviction_tiles_index_ != eviction_tiles_->size() && |
1195 !(*eviction_tiles_)[current_eviction_tiles_index_]->HasResources()); | 1195 !(*eviction_tiles_)[current_eviction_tiles_index_]->HasResources()); |
1196 | 1196 |
1197 return *this; | 1197 return *this; |
1198 } | 1198 } |
1199 | 1199 |
1200 } // namespace cc | 1200 } // namespace cc |
OLD | NEW |