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

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

Issue 562833004: cc: Move RasterBuffer implementations from ResourceProvider to RasterWorkerPool implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and fix gpu raster issue Created 6 years, 3 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
« no previous file with comments | « cc/resources/raster_buffer.cc ('k') | cc/resources/raster_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 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 "cc/resources/rasterizer.h" 8 #include "cc/resources/rasterizer.h"
9 #include "ui/gfx/geometry/size.h"
9 10
10 namespace base { 11 namespace base {
11 class SequencedTaskRunner; 12 class SequencedTaskRunner;
12 } 13 }
13 14
14 namespace cc { 15 namespace cc {
15 16
16 class CC_EXPORT RasterWorkerPool { 17 class CC_EXPORT RasterWorkerPool {
17 public: 18 public:
18 static unsigned kOnDemandRasterTaskPriority; 19 static unsigned kOnDemandRasterTaskPriority;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 size_t dependencies); 55 size_t dependencies);
55 56
56 // Utility function that can be used to build a task graph. Inserts nodes that 57 // Utility function that can be used to build a task graph. Inserts nodes that
57 // represent |task| and all its image decode dependencies in |graph|. 58 // represent |task| and all its image decode dependencies in |graph|.
58 static void InsertNodesForRasterTask( 59 static void InsertNodesForRasterTask(
59 TaskGraph* graph, 60 TaskGraph* graph,
60 RasterTask* task, 61 RasterTask* task,
61 const ImageDecodeTask::Vector& decode_tasks, 62 const ImageDecodeTask::Vector& decode_tasks,
62 unsigned priority); 63 unsigned priority);
63 64
65 // Utility functions that transparently create a temporary bitmap and copy
66 // pixels to buffer when necessary.
67 static void AcquireBitmapForBuffer(SkBitmap* bitmap,
68 uint8_t* buffer,
69 ResourceFormat format,
70 const gfx::Size& size,
71 int stride);
72 static void ReleaseBitmapForBuffer(SkBitmap* bitmap,
73 uint8_t* buffer,
74 ResourceFormat format);
75
64 // Type-checking downcast routine. 76 // Type-checking downcast routine.
65 virtual Rasterizer* AsRasterizer() = 0; 77 virtual Rasterizer* AsRasterizer() = 0;
66 }; 78 };
67 79
68 } // namespace cc 80 } // namespace cc
69 81
70 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_ 82 #endif // CC_RESOURCES_RASTER_WORKER_POOL_H_
OLDNEW
« no previous file with comments | « cc/resources/raster_buffer.cc ('k') | cc/resources/raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698