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 #ifndef CC_RESOURCES_RASTER_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_RASTER_WORKER_POOL_H_ |
6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_ | 6 #define CC_RESOURCES_RASTER_WORKER_POOL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 }; | 43 }; |
44 | 44 |
45 class CC_EXPORT RasterWorkerPoolTask | 45 class CC_EXPORT RasterWorkerPoolTask |
46 : public base::RefCounted<RasterWorkerPoolTask> { | 46 : public base::RefCounted<RasterWorkerPoolTask> { |
47 public: | 47 public: |
48 // Returns true if |buffer| was written to. False indicate that | 48 // Returns true if |buffer| was written to. False indicate that |
49 // the content of |buffer| is undefined and the resource doesn't | 49 // the content of |buffer| is undefined and the resource doesn't |
50 // need to be initialized. | 50 // need to be initialized. |
51 virtual bool RunOnWorkerThread(unsigned thread_index, | 51 virtual bool RunOnWorkerThread(unsigned thread_index, |
52 void* buffer, | 52 void* buffer, |
53 gfx::Size size, | 53 const gfx::Size& size, |
54 int stride) = 0; | 54 int stride) = 0; |
55 virtual void RunOnOriginThread(ResourceProvider* resource_provider, | 55 virtual void RunOnOriginThread(ResourceProvider* resource_provider, |
56 ContextProvider* context_provider) = 0; | 56 ContextProvider* context_provider) = 0; |
57 virtual void CompleteOnOriginThread() = 0; | 57 virtual void CompleteOnOriginThread() = 0; |
58 | 58 |
59 void DidRun(bool was_canceled); | 59 void DidRun(bool was_canceled); |
60 bool HasFinishedRunning() const; | 60 bool HasFinishedRunning() const; |
61 bool WasCanceled() const; | 61 bool WasCanceled() const; |
62 void WillComplete(); | 62 void WillComplete(); |
63 void DidComplete(); | 63 void DidComplete(); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 316 |
317 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; | 317 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; |
318 scoped_refptr<internal::WorkerPoolTask> | 318 scoped_refptr<internal::WorkerPoolTask> |
319 raster_required_for_activation_finished_task_; | 319 raster_required_for_activation_finished_task_; |
320 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; | 320 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; |
321 }; | 321 }; |
322 | 322 |
323 } // namespace cc | 323 } // namespace cc |
324 | 324 |
325 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ | 325 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ |
OLD | NEW |