| 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 <string> | 8 #include <string> | 
| 9 | 9 | 
| 10 #include "base/bind.h" | 10 #include "base/bind.h" | 
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 118       manage_tiles_pending_(false), | 118       manage_tiles_pending_(false), | 
| 119       manage_tiles_call_count_(0), | 119       manage_tiles_call_count_(0), | 
| 120       bytes_pending_upload_(0), | 120       bytes_pending_upload_(0), | 
| 121       has_performed_uploads_since_last_flush_(false), | 121       has_performed_uploads_since_last_flush_(false), | 
| 122       ever_exceeded_memory_budget_(false), | 122       ever_exceeded_memory_budget_(false), | 
| 123       rendering_stats_instrumentation_(rendering_stats_instrumentation), | 123       rendering_stats_instrumentation_(rendering_stats_instrumentation), | 
| 124       use_color_estimator_(use_color_estimator), | 124       use_color_estimator_(use_color_estimator), | 
| 125       prediction_benchmarking_(prediction_benchmarking), | 125       prediction_benchmarking_(prediction_benchmarking), | 
| 126       did_initialize_visible_tile_(false), | 126       did_initialize_visible_tile_(false), | 
| 127       pending_tasks_(0), | 127       pending_tasks_(0), | 
| 128       max_pending_tasks_(kMaxNumPendingTasksPerThread * num_raster_threads) { | 128       max_pending_tasks_(kMaxNumPendingTasksPerThread * num_raster_threads), | 
|  | 129       use_gpu_memory_buffers_(false) { | 
| 129 } | 130 } | 
| 130 | 131 | 
| 131 TileManager::~TileManager() { | 132 TileManager::~TileManager() { | 
| 132   // Reset global state and manage. This should cause | 133   // Reset global state and manage. This should cause | 
| 133   // our memory usage to drop to zero. | 134   // our memory usage to drop to zero. | 
| 134   global_state_ = GlobalStateThatImpactsTilePriority(); | 135   global_state_ = GlobalStateThatImpactsTilePriority(); | 
| 135   AssignGpuMemoryToTiles(); | 136   AssignGpuMemoryToTiles(); | 
| 136   // This should finish all pending tasks and release any uninitialized | 137   // This should finish all pending tasks and release any uninitialized | 
| 137   // resources. | 138   // resources. | 
| 138   raster_worker_pool_->Shutdown(); | 139   raster_worker_pool_->Shutdown(); | 
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 976   HISTOGRAM_BOOLEAN("Renderer4.ColorPredictor.WrongColor", | 977   HISTOGRAM_BOOLEAN("Renderer4.ColorPredictor.WrongColor", | 
| 977                     is_predicted_solid && predicted_color != actual_color); | 978                     is_predicted_solid && predicted_color != actual_color); | 
| 978   HISTOGRAM_BOOLEAN("Renderer4.ColorPredictor.Accuracy", | 979   HISTOGRAM_BOOLEAN("Renderer4.ColorPredictor.Accuracy", | 
| 979                     is_predicted_solid == is_actually_solid && | 980                     is_predicted_solid == is_actually_solid && | 
| 980                     (!is_predicted_solid || predicted_color == actual_color)); | 981                     (!is_predicted_solid || predicted_color == actual_color)); | 
| 981   HISTOGRAM_BOOLEAN("Renderer4.ColorPredictor.IsCorrectSolid", | 982   HISTOGRAM_BOOLEAN("Renderer4.ColorPredictor.IsCorrectSolid", | 
| 982                     is_predicted_solid == is_actually_solid && | 983                     is_predicted_solid == is_actually_solid && | 
| 983                     (is_predicted_solid && predicted_color == actual_color)); | 984                     (is_predicted_solid && predicted_color == actual_color)); | 
| 984 } | 985 } | 
| 985 | 986 | 
|  | 987 void TileManager::SetUseGpuMemoryBuffers(bool use_gpu_memory_buffers) { | 
|  | 988   use_gpu_memory_buffers_ = use_gpu_memory_buffers; | 
|  | 989 } | 
|  | 990 | 
| 986 }  // namespace cc | 991 }  // namespace cc | 
| OLD | NEW | 
|---|