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

Side by Side Diff: cc/resources/raster_worker_pool.h

Issue 20017005: gpu: Refactor GpuMemoryBuffer framework for multi-process support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 months 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 | Annotate | Revision Log
OLDNEW
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 <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
11 #include "cc/debug/rendering_stats_instrumentation.h" 11 #include "cc/debug/rendering_stats_instrumentation.h"
12 #include "cc/resources/picture_pile_impl.h" 12 #include "cc/resources/picture_pile_impl.h"
13 #include "cc/resources/raster_mode.h" 13 #include "cc/resources/raster_mode.h"
14 #include "cc/resources/tile_priority.h" 14 #include "cc/resources/tile_priority.h"
15 #include "cc/resources/worker_pool.h" 15 #include "cc/resources/worker_pool.h"
16 #include "third_party/khronos/GLES2/gl2.h"
16 17
17 class SkDevice; 18 class SkDevice;
18 19
19 namespace skia { 20 namespace skia {
20 class LazyPixelRef; 21 class LazyPixelRef;
21 } 22 }
22 23
23 namespace cc { 24 namespace cc {
24 class PicturePileImpl; 25 class PicturePileImpl;
25 class PixelBufferRasterWorkerPool; 26 class PixelBufferRasterWorkerPool;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // scheduled tasks. Reply callbacks are still guaranteed to run. 177 // scheduled tasks. Reply callbacks are still guaranteed to run.
177 virtual void Shutdown() OVERRIDE; 178 virtual void Shutdown() OVERRIDE;
178 179
179 // Schedule running of raster tasks in |queue| and all dependencies. 180 // Schedule running of raster tasks in |queue| and all dependencies.
180 // Previously scheduled tasks that are no longer needed to run 181 // Previously scheduled tasks that are no longer needed to run
181 // raster tasks in |queue| will be canceled unless already running. 182 // raster tasks in |queue| will be canceled unless already running.
182 // Once scheduled, reply callbacks are guaranteed to run for all tasks 183 // Once scheduled, reply callbacks are guaranteed to run for all tasks
183 // even if they later get canceled by another call to ScheduleTasks(). 184 // even if they later get canceled by another call to ScheduleTasks().
184 virtual void ScheduleTasks(RasterTask::Queue* queue) = 0; 185 virtual void ScheduleTasks(RasterTask::Queue* queue) = 0;
185 186
187 // Returns the format that need to be used for raster task resources.
kaanb 2013/08/15 18:31:29 nit: s/need/needs/
reveman 2013/08/16 01:34:57 Done.
188 virtual GLenum GetResourceFormat() const = 0;
189
186 // TODO(vmpstr): Figure out an elegant way to not pass this many parameters. 190 // TODO(vmpstr): Figure out an elegant way to not pass this many parameters.
187 static RasterTask CreateRasterTask( 191 static RasterTask CreateRasterTask(
188 const Resource* resource, 192 const Resource* resource,
189 PicturePileImpl* picture_pile, 193 PicturePileImpl* picture_pile,
190 gfx::Rect content_rect, 194 gfx::Rect content_rect,
191 float contents_scale, 195 float contents_scale,
192 RasterMode raster_mode, 196 RasterMode raster_mode,
193 bool is_tile_in_pending_tree_now_bin, 197 bool is_tile_in_pending_tree_now_bin,
194 TileResolution tile_resolution, 198 TileResolution tile_resolution,
195 int layer_id, 199 int layer_id,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 273
270 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_; 274 base::WeakPtrFactory<RasterWorkerPool> weak_ptr_factory_;
271 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_; 275 scoped_refptr<internal::WorkerPoolTask> raster_finished_task_;
272 scoped_refptr<internal::WorkerPoolTask> 276 scoped_refptr<internal::WorkerPoolTask>
273 raster_required_for_activation_finished_task_; 277 raster_required_for_activation_finished_task_;
274 }; 278 };
275 279
276 } // namespace cc 280 } // namespace cc
277 281
278 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ 282 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698