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

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

Issue 69343005: Added preliminary support for tile rasterization with Ganesh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (ScopedResource). Created 7 years 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/cc.gyp ('k') | cc/resources/gpu_rasterizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_RESOURCES_GPU_RASTERIZER_H_
6 #define CC_RESOURCES_GPU_RASTERIZER_H_
7
8 #include "base/memory/scoped_vector.h"
9 #include "cc/resources/resource_pool.h"
10 #include "cc/resources/tile.h"
11
12 namespace cc {
13
14 class ContextProvider;
15 class ResourceProvider;
16 class RenderingStatsInstrumentation;
17
18 class CC_EXPORT GpuRasterizerClient {
19 public:
20 virtual void OnGpuRasterTaskCompleted(
21 Tile* tile, scoped_ptr<ScopedResource> resource) = 0;
22 };
23
24 class CC_EXPORT GpuRasterizer {
25 public:
26 static scoped_ptr<GpuRasterizer> Create(
27 ContextProvider* context_provider,
28 ResourceProvider* resource_provider);
29 virtual ~GpuRasterizer();
30
31 void SetClient(GpuRasterizerClient* client);
32
33 class RasterTask {
34 public:
35 RasterTask(Tile* tile, scoped_ptr<ScopedResource> resource);
36 ~RasterTask();
37
38 private:
39 friend class GpuRasterizer;
40 friend class FakeGpuRasterizer;
41
42 Tile* tile_;
43 scoped_ptr<ScopedResource> resource_;
44 };
45
46 typedef ScopedVector<RasterTask> RasterTaskVector;
47
48 class CC_EXPORT Queue {
49 public:
50 Queue();
51 ~Queue();
52
53 void Append(Tile* tile, scoped_ptr<ScopedResource> resource);
54
55 private:
56 friend class GpuRasterizer;
57 friend class FakeGpuRasterizer;
58
59 RasterTaskVector raster_tasks_;
60 };
61
62 virtual void Rasterize(
63 const Queue& queue,
64 RenderingStatsInstrumentation* rendering_stats_instrumentation);
65
66 protected:
67 GpuRasterizer(
68 ContextProvider* context_provider,
69 ResourceProvider* resource_provider);
70
71 GpuRasterizerClient* client_;
72 ContextProvider* context_provider_;
73 ResourceProvider* resource_provider_;
74 };
75
76 } // namespace cc
77
78 #endif // CC_RESOURCES_GPU_RASTERIZER_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/resources/gpu_rasterizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698