OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_task_worker_pool.h" | 5 #include "cc/resources/tile_task_worker_pool.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/debug/trace_event.h" | |
10 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
11 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
12 #include "base/threading/simple_thread.h" | 11 #include "base/threading/simple_thread.h" |
| 12 #include "base/trace_event/trace_event.h" |
13 #include "cc/base/scoped_ptr_deque.h" | 13 #include "cc/base/scoped_ptr_deque.h" |
14 #include "cc/resources/raster_source.h" | 14 #include "cc/resources/raster_source.h" |
15 #include "skia/ext/refptr.h" | 15 #include "skia/ext/refptr.h" |
16 #include "third_party/skia/include/core/SkCanvas.h" | 16 #include "third_party/skia/include/core/SkCanvas.h" |
17 #include "third_party/skia/include/core/SkSurface.h" | 17 #include "third_party/skia/include/core/SkSurface.h" |
18 | 18 |
19 namespace cc { | 19 namespace cc { |
20 namespace { | 20 namespace { |
21 | 21 |
22 base::ThreadPriority g_worker_thread_priority = base::kThreadPriority_Normal; | 22 base::ThreadPriority g_worker_thread_priority = base::kThreadPriority_Normal; |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // TODO(kaanb): The GL pipeline assumes a 4-byte alignment for the | 260 // TODO(kaanb): The GL pipeline assumes a 4-byte alignment for the |
261 // bitmap data. There will be no need to call SkAlign4 once crbug.com/293728 | 261 // bitmap data. There will be no need to call SkAlign4 once crbug.com/293728 |
262 // is fixed. | 262 // is fixed. |
263 const size_t dst_row_bytes = SkAlign4(dst_info.minRowBytes()); | 263 const size_t dst_row_bytes = SkAlign4(dst_info.minRowBytes()); |
264 DCHECK_EQ(0u, dst_row_bytes % 4); | 264 DCHECK_EQ(0u, dst_row_bytes % 4); |
265 bool success = canvas->readPixels(dst_info, memory, dst_row_bytes, 0, 0); | 265 bool success = canvas->readPixels(dst_info, memory, dst_row_bytes, 0, 0); |
266 DCHECK_EQ(true, success); | 266 DCHECK_EQ(true, success); |
267 } | 267 } |
268 | 268 |
269 } // namespace cc | 269 } // namespace cc |
OLD | NEW |