| 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/tiles/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 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/json/json_writer.h" | 12 #include "base/json/json_writer.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
| 15 #include "base/trace_event/trace_event_argument.h" | 15 #include "base/trace_event/trace_event_argument.h" |
| 16 #include "cc/debug/devtools_instrumentation.h" | 16 #include "cc/debug/devtools_instrumentation.h" |
| 17 #include "cc/debug/frame_viewer_instrumentation.h" | 17 #include "cc/debug/frame_viewer_instrumentation.h" |
| 18 #include "cc/debug/traced_value.h" | 18 #include "cc/debug/traced_value.h" |
| 19 #include "cc/layers/picture_layer_impl.h" | 19 #include "cc/layers/picture_layer_impl.h" |
| 20 #include "cc/resources/raster_buffer.h" | 20 #include "cc/raster/raster_buffer.h" |
| 21 #include "cc/resources/tile.h" | 21 #include "cc/raster/tile_task_runner.h" |
| 22 #include "cc/resources/tile_task_runner.h" | 22 #include "cc/tiles/tile.h" |
| 23 #include "ui/gfx/geometry/rect_conversions.h" | 23 #include "ui/gfx/geometry/rect_conversions.h" |
| 24 | 24 |
| 25 namespace cc { | 25 namespace cc { |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // Flag to indicate whether we should try and detect that | 28 // Flag to indicate whether we should try and detect that |
| 29 // a tile is of solid color. | 29 // a tile is of solid color. |
| 30 const bool kUseColorEstimator = true; | 30 const bool kUseColorEstimator = true; |
| 31 | 31 |
| 32 class RasterTaskImpl : public RasterTask { | 32 class RasterTaskImpl : public RasterTask { |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 result -= other; | 966 result -= other; |
| 967 return result; | 967 return result; |
| 968 } | 968 } |
| 969 | 969 |
| 970 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const { | 970 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const { |
| 971 return memory_bytes_ > limit.memory_bytes_ || | 971 return memory_bytes_ > limit.memory_bytes_ || |
| 972 resource_count_ > limit.resource_count_; | 972 resource_count_ > limit.resource_count_; |
| 973 } | 973 } |
| 974 | 974 |
| 975 } // namespace cc | 975 } // namespace cc |
| OLD | NEW |