Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: cc/raster/one_copy_tile_task_worker_pool.h

Issue 1441613002: cc: Remove ScopedPtrDeque. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/raster/one_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ 5 #ifndef CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_
6 #define CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ 6 #define CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_
7 7
8 #include <deque>
8 #include <set> 9 #include <set>
9 10
10 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
11 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "base/trace_event/memory_dump_provider.h" 14 #include "base/trace_event/memory_dump_provider.h"
14 #include "base/values.h" 15 #include "base/values.h"
15 #include "cc/base/scoped_ptr_deque.h"
16 #include "cc/output/context_provider.h" 16 #include "cc/output/context_provider.h"
17 #include "cc/raster/tile_task_runner.h" 17 #include "cc/raster/tile_task_runner.h"
18 #include "cc/raster/tile_task_worker_pool.h" 18 #include "cc/raster/tile_task_worker_pool.h"
19 #include "cc/resources/resource_provider.h" 19 #include "cc/resources/resource_provider.h"
20 20
21 namespace base { 21 namespace base {
22 namespace trace_event { 22 namespace trace_event {
23 class ConvertableToTraceFormat; 23 class ConvertableToTraceFormat;
24 class TracedValue; 24 class TracedValue;
25 } 25 }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 // Task graph used when scheduling tasks and vector used to gather 146 // Task graph used when scheduling tasks and vector used to gather
147 // completed tasks. 147 // completed tasks.
148 TaskGraph graph_; 148 TaskGraph graph_;
149 Task::Vector completed_tasks_; 149 Task::Vector completed_tasks_;
150 150
151 mutable base::Lock lock_; 151 mutable base::Lock lock_;
152 // |lock_| must be acquired when accessing the following members. 152 // |lock_| must be acquired when accessing the following members.
153 using StagingBufferSet = std::set<const StagingBuffer*>; 153 using StagingBufferSet = std::set<const StagingBuffer*>;
154 StagingBufferSet buffers_; 154 StagingBufferSet buffers_;
155 using StagingBufferDeque = ScopedPtrDeque<StagingBuffer>; 155 using StagingBufferDeque = std::deque<scoped_ptr<StagingBuffer>>;
156 StagingBufferDeque free_buffers_; 156 StagingBufferDeque free_buffers_;
157 StagingBufferDeque busy_buffers_; 157 StagingBufferDeque busy_buffers_;
158 int bytes_scheduled_since_last_flush_; 158 int bytes_scheduled_since_last_flush_;
159 const int max_staging_buffer_usage_in_bytes_; 159 const int max_staging_buffer_usage_in_bytes_;
160 bool use_rgba_4444_texture_format_; 160 bool use_rgba_4444_texture_format_;
161 int staging_buffer_usage_in_bytes_; 161 int staging_buffer_usage_in_bytes_;
162 int free_staging_buffer_usage_in_bytes_; 162 int free_staging_buffer_usage_in_bytes_;
163 const base::TimeDelta staging_buffer_expiration_delay_; 163 const base::TimeDelta staging_buffer_expiration_delay_;
164 bool reduce_memory_usage_pending_; 164 bool reduce_memory_usage_pending_;
165 base::Closure reduce_memory_usage_callback_; 165 base::Closure reduce_memory_usage_callback_;
166 166
167 base::WeakPtrFactory<OneCopyTileTaskWorkerPool> weak_ptr_factory_; 167 base::WeakPtrFactory<OneCopyTileTaskWorkerPool> weak_ptr_factory_;
168 // "raster finished" tasks need their own factory as they need to be 168 // "raster finished" tasks need their own factory as they need to be
169 // canceled when ScheduleTasks() is called. 169 // canceled when ScheduleTasks() is called.
170 base::WeakPtrFactory<OneCopyTileTaskWorkerPool> 170 base::WeakPtrFactory<OneCopyTileTaskWorkerPool>
171 task_set_finished_weak_ptr_factory_; 171 task_set_finished_weak_ptr_factory_;
172 172
173 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool); 173 DISALLOW_COPY_AND_ASSIGN(OneCopyTileTaskWorkerPool);
174 }; 174 };
175 175
176 } // namespace cc 176 } // namespace cc
177 177
178 #endif // CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ 178 #endif // CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/raster/one_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698