| 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/tiles/picture_layer_tiling.h" | 5 #include "cc/tiles/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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 int skewport_extrapolation_limit_in_content_pixels) | 57 int skewport_extrapolation_limit_in_content_pixels) |
| 58 : tiling_interest_area_padding_(tiling_interest_area_padding), | 58 : tiling_interest_area_padding_(tiling_interest_area_padding), |
| 59 skewport_target_time_in_seconds_(skewport_target_time_in_seconds), | 59 skewport_target_time_in_seconds_(skewport_target_time_in_seconds), |
| 60 skewport_extrapolation_limit_in_content_pixels_( | 60 skewport_extrapolation_limit_in_content_pixels_( |
| 61 skewport_extrapolation_limit_in_content_pixels), | 61 skewport_extrapolation_limit_in_content_pixels), |
| 62 contents_scale_(contents_scale), | 62 contents_scale_(contents_scale), |
| 63 client_(client), | 63 client_(client), |
| 64 tree_(tree), | 64 tree_(tree), |
| 65 raster_source_(raster_source), | 65 raster_source_(raster_source), |
| 66 resolution_(NON_IDEAL_RESOLUTION), | 66 resolution_(NON_IDEAL_RESOLUTION), |
| 67 was_ever_low_resolution_(false), | 67 may_contain_low_resolution_tiles_(false), |
| 68 tiling_data_(gfx::Size(), gfx::Size(), kBorderTexels), | 68 tiling_data_(gfx::Size(), gfx::Size(), kBorderTexels), |
| 69 can_require_tiles_for_activation_(false), | 69 can_require_tiles_for_activation_(false), |
| 70 current_content_to_screen_scale_(0.f), | 70 current_content_to_screen_scale_(0.f), |
| 71 has_visible_rect_tiles_(false), | 71 has_visible_rect_tiles_(false), |
| 72 has_skewport_rect_tiles_(false), | 72 has_skewport_rect_tiles_(false), |
| 73 has_soon_border_rect_tiles_(false), | 73 has_soon_border_rect_tiles_(false), |
| 74 has_eventually_rect_tiles_(false), | 74 has_eventually_rect_tiles_(false), |
| 75 all_tiles_done_(true) { | 75 all_tiles_done_(true) { |
| 76 DCHECK(!raster_source->IsSolidColor()); | 76 DCHECK(!raster_source->IsSolidColor()); |
| 77 gfx::Size content_bounds = gfx::ToCeiledSize( | 77 gfx::Size content_bounds = gfx::ToCeiledSize( |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const { | 962 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const { |
| 963 size_t amount = 0; | 963 size_t amount = 0; |
| 964 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { | 964 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { |
| 965 const Tile* tile = it->second; | 965 const Tile* tile = it->second; |
| 966 amount += tile->GPUMemoryUsageInBytes(); | 966 amount += tile->GPUMemoryUsageInBytes(); |
| 967 } | 967 } |
| 968 return amount; | 968 return amount; |
| 969 } | 969 } |
| 970 | 970 |
| 971 } // namespace cc | 971 } // namespace cc |
| OLD | NEW |