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/tile_manager.h" | 5 #include "cc/resources/tile_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 UMA_HISTOGRAM_BOOLEAN("Renderer4.SolidColorTilesAnalyzed", | 103 UMA_HISTOGRAM_BOOLEAN("Renderer4.SolidColorTilesAnalyzed", |
104 analysis_.is_solid_color); | 104 analysis_.is_solid_color); |
105 | 105 |
106 // Clear the flag if we're not using the estimator. | 106 // Clear the flag if we're not using the estimator. |
107 analysis_.is_solid_color &= kUseColorEstimator; | 107 analysis_.is_solid_color &= kUseColorEstimator; |
108 } | 108 } |
109 | 109 |
110 void Raster(const RasterSource* raster_source) { | 110 void Raster(const RasterSource* raster_source) { |
111 frame_viewer_instrumentation::ScopedRasterTask raster_task( | 111 frame_viewer_instrumentation::ScopedRasterTask raster_task( |
112 tile_id_, tile_resolution_, source_frame_number_, layer_id_); | 112 tile_id_, tile_resolution_, source_frame_number_, layer_id_); |
113 devtools_instrumentation::ScopedLayerTask layer_task( | |
114 devtools_instrumentation::kRasterTask, layer_id_); | |
115 | 113 |
116 DCHECK(raster_source); | 114 DCHECK(raster_source); |
117 | 115 |
118 raster_buffer_->Playback(raster_source_.get(), content_rect_, | 116 raster_buffer_->Playback(raster_source_.get(), content_rect_, |
119 contents_scale_); | 117 contents_scale_); |
120 } | 118 } |
121 | 119 |
122 RasterSource::SolidColorAnalysis analysis_; | 120 RasterSource::SolidColorAnalysis analysis_; |
123 scoped_refptr<RasterSource> raster_source_; | 121 scoped_refptr<RasterSource> raster_source_; |
124 gfx::Rect content_rect_; | 122 gfx::Rect content_rect_; |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 result -= other; | 953 result -= other; |
956 return result; | 954 return result; |
957 } | 955 } |
958 | 956 |
959 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const { | 957 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const { |
960 return memory_bytes_ > limit.memory_bytes_ || | 958 return memory_bytes_ > limit.memory_bytes_ || |
961 resource_count_ > limit.resource_count_; | 959 resource_count_ > limit.resource_count_; |
962 } | 960 } |
963 | 961 |
964 } // namespace cc | 962 } // namespace cc |
OLD | NEW |