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/tile_manager.h" | 5 #include "cc/resources/tile_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
14 #include "cc/debug/devtools_instrumentation.h" | 14 #include "cc/debug/devtools_instrumentation.h" |
15 #include "cc/platform_color.h" | 15 #include "cc/resources/platform_color.h" |
16 #include "cc/raster_worker_pool.h" | 16 #include "cc/resources/raster_worker_pool.h" |
17 #include "cc/resource_pool.h" | 17 #include "cc/resources/resource_pool.h" |
18 #include "cc/tile.h" | 18 #include "cc/resources/tile.h" |
19 #include "third_party/skia/include/core/SkDevice.h" | 19 #include "third_party/skia/include/core/SkDevice.h" |
20 | 20 |
21 namespace cc { | 21 namespace cc { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // If we raster too fast we become upload bound, and pending | 25 // If we raster too fast we become upload bound, and pending |
26 // uploads consume memory. For maximum upload throughput, we would | 26 // uploads consume memory. For maximum upload throughput, we would |
27 // want to allow for upload_throughput * pipeline_time of pending | 27 // want to allow for upload_throughput * pipeline_time of pending |
28 // uploads, after which we are just wasting memory. Since we don't | 28 // uploads, after which we are just wasting memory. Since we don't |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 decode_begin_time = base::TimeTicks::HighResNow(); | 1105 decode_begin_time = base::TimeTicks::HighResNow(); |
1106 pixel_ref->Decode(); | 1106 pixel_ref->Decode(); |
1107 if (stats) { | 1107 if (stats) { |
1108 stats->totalDeferredImageDecodeCount++; | 1108 stats->totalDeferredImageDecodeCount++; |
1109 stats->totalDeferredImageDecodeTime += | 1109 stats->totalDeferredImageDecodeTime += |
1110 base::TimeTicks::HighResNow() - decode_begin_time; | 1110 base::TimeTicks::HighResNow() - decode_begin_time; |
1111 } | 1111 } |
1112 } | 1112 } |
1113 | 1113 |
1114 } // namespace cc | 1114 } // namespace cc |
OLD | NEW |