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

Side by Side Diff: cc/resources/rasterizer.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_worker_pool_unittest.cc ('k') | cc/resources/resource_provider.h » ('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_RESOURCES_RASTERIZER_H_ 5 #ifndef CC_RESOURCES_RASTERIZER_H_
6 #define CC_RESOURCES_RASTERIZER_H_ 6 #define CC_RESOURCES_RASTERIZER_H_
7 7
8 #include <bitset> 8 #include <bitset>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "cc/resources/resource_format.h" 12 #include "cc/resources/resource_format.h"
13 #include "cc/resources/task_graph_runner.h" 13 #include "cc/resources/task_graph_runner.h"
14 14
15 namespace cc { 15 namespace cc {
16 class ImageDecodeTask; 16 class ImageDecodeTask;
17 class RasterTask; 17 class RasterTask;
18 class Resource; 18 class Resource;
19 class RasterBuffer; 19 class RasterBuffer;
20 20
21 class CC_EXPORT RasterizerTaskClient { 21 class CC_EXPORT RasterizerTaskClient {
22 public: 22 public:
23 virtual RasterBuffer* AcquireBufferForRaster(RasterTask* task) = 0; 23 virtual scoped_ptr<RasterBuffer> AcquireBufferForRaster(
24 virtual void ReleaseBufferForRaster(RasterTask* task) = 0; 24 const Resource* resource) = 0;
25 virtual void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) = 0;
25 26
26 protected: 27 protected:
27 virtual ~RasterizerTaskClient() {} 28 virtual ~RasterizerTaskClient() {}
28 }; 29 };
29 30
30 class CC_EXPORT RasterizerTask : public Task { 31 class CC_EXPORT RasterizerTask : public Task {
31 public: 32 public:
32 typedef std::vector<scoped_refptr<RasterizerTask> > Vector; 33 typedef std::vector<scoped_refptr<RasterizerTask> > Vector;
33 34
34 virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) = 0; 35 virtual void ScheduleOnOriginThread(RasterizerTaskClient* client) = 0;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Check for completed tasks and dispatch reply callbacks. 155 // Check for completed tasks and dispatch reply callbacks.
155 virtual void CheckForCompletedTasks() = 0; 156 virtual void CheckForCompletedTasks() = 0;
156 157
157 protected: 158 protected:
158 virtual ~Rasterizer() {} 159 virtual ~Rasterizer() {}
159 }; 160 };
160 161
161 } // namespace cc 162 } // namespace cc
162 163
163 #endif // CC_RESOURCES_RASTERIZER_H_ 164 #endif // CC_RESOURCES_RASTERIZER_H_
OLDNEW
« no previous file with comments | « cc/resources/raster_worker_pool_unittest.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698