OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ONE_COPY_RASTER_WORKER_POOL_H_ | 5 #ifndef CC_RESOURCES_ONE_COPY_RASTER_WORKER_POOL_H_ |
6 #define CC_RESOURCES_ONE_COPY_RASTER_WORKER_POOL_H_ | 6 #define CC_RESOURCES_ONE_COPY_RASTER_WORKER_POOL_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override; | 55 void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override; |
56 | 56 |
57 // Playback raster source and schedule copy of |src| resource to |dst| | 57 // Playback raster source and schedule copy of |src| resource to |dst| |
58 // resource. Returns a non-zero sequence number for this copy operation. | 58 // resource. Returns a non-zero sequence number for this copy operation. |
59 CopySequenceNumber PlaybackAndScheduleCopyOnWorkerThread( | 59 CopySequenceNumber PlaybackAndScheduleCopyOnWorkerThread( |
60 scoped_ptr<ResourceProvider::ScopedWriteLockGpuMemoryBuffer> write_lock, | 60 scoped_ptr<ResourceProvider::ScopedWriteLockGpuMemoryBuffer> write_lock, |
61 scoped_ptr<ScopedResource> src, | 61 scoped_ptr<ScopedResource> src, |
62 const Resource* dst, | 62 const Resource* dst, |
63 const RasterSource* raster_source, | 63 const RasterSource* raster_source, |
64 const gfx::Rect& rect, | 64 const gfx::Rect& rect, |
65 float scale, | 65 float scale); |
66 RenderingStatsInstrumentation* stats); | |
67 | 66 |
68 // Issues copy operations until |sequence| has been processed. This will | 67 // Issues copy operations until |sequence| has been processed. This will |
69 // return immediately if |sequence| has already been processed. | 68 // return immediately if |sequence| has already been processed. |
70 void AdvanceLastIssuedCopyTo(CopySequenceNumber sequence); | 69 void AdvanceLastIssuedCopyTo(CopySequenceNumber sequence); |
71 | 70 |
72 protected: | 71 protected: |
73 OneCopyRasterWorkerPool(base::SequencedTaskRunner* task_runner, | 72 OneCopyRasterWorkerPool(base::SequencedTaskRunner* task_runner, |
74 TaskGraphRunner* task_graph_runner, | 73 TaskGraphRunner* task_graph_runner, |
75 ContextProvider* context_provider, | 74 ContextProvider* context_provider, |
76 ResourceProvider* resource_provider, | 75 ResourceProvider* resource_provider, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // canceled when ScheduleTasks() is called. | 132 // canceled when ScheduleTasks() is called. |
134 base::WeakPtrFactory<OneCopyRasterWorkerPool> | 133 base::WeakPtrFactory<OneCopyRasterWorkerPool> |
135 raster_finished_weak_ptr_factory_; | 134 raster_finished_weak_ptr_factory_; |
136 | 135 |
137 DISALLOW_COPY_AND_ASSIGN(OneCopyRasterWorkerPool); | 136 DISALLOW_COPY_AND_ASSIGN(OneCopyRasterWorkerPool); |
138 }; | 137 }; |
139 | 138 |
140 } // namespace cc | 139 } // namespace cc |
141 | 140 |
142 #endif // CC_RESOURCES_ONE_COPY_RASTER_WORKER_POOL_H_ | 141 #endif // CC_RESOURCES_ONE_COPY_RASTER_WORKER_POOL_H_ |
OLD | NEW |