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/pixel_buffer_raster_worker_pool.h" | 5 #include "cc/resources/pixel_buffer_raster_worker_pool.h" |
6 | 6 |
7 #include "base/containers/stack_container.h" | 7 #include "base/containers/stack_container.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "cc/debug/traced_value.h" | 10 #include "cc/debug/traced_value.h" |
11 #include "cc/resources/resource.h" | 11 #include "cc/resources/resource.h" |
12 #include "third_party/skia/include/core/SkBitmapDevice.h" | 12 #include "third_party/skia/include/core/SkBitmapDevice.h" |
13 | 13 |
14 #if defined(OS_ANDROID) | |
15 #include "base/android/sys_utils.h" | |
16 #endif | |
17 | |
18 namespace cc { | 14 namespace cc { |
19 | 15 |
20 namespace { | 16 namespace { |
21 | 17 |
22 class PixelBufferWorkerPoolTaskImpl : public internal::WorkerPoolTask { | 18 class PixelBufferWorkerPoolTaskImpl : public internal::WorkerPoolTask { |
23 public: | 19 public: |
24 typedef base::Callback<void(bool was_canceled, bool needs_upload)> Reply; | 20 typedef base::Callback<void(bool was_canceled, bool needs_upload)> Reply; |
25 | 21 |
26 PixelBufferWorkerPoolTaskImpl(internal::RasterWorkerPoolTask* task, | 22 PixelBufferWorkerPoolTaskImpl(internal::RasterWorkerPoolTask* task, |
27 uint8_t* buffer, | 23 uint8_t* buffer, |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 | 688 |
693 throttle_state->SetInteger("bytes_available_for_upload", | 689 throttle_state->SetInteger("bytes_available_for_upload", |
694 max_bytes_pending_upload_ - bytes_pending_upload_); | 690 max_bytes_pending_upload_ - bytes_pending_upload_); |
695 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); | 691 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); |
696 throttle_state->SetInteger("scheduled_raster_task_count", | 692 throttle_state->SetInteger("scheduled_raster_task_count", |
697 scheduled_raster_task_count_); | 693 scheduled_raster_task_count_); |
698 return throttle_state.PassAs<base::Value>(); | 694 return throttle_state.PassAs<base::Value>(); |
699 } | 695 } |
700 | 696 |
701 } // namespace cc | 697 } // namespace cc |
OLD | NEW |