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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/cc.gyp ('k') | cc/resources/gpu_rasterizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/gpu_rasterizer.h
diff --git a/cc/resources/gpu_rasterizer.h b/cc/resources/gpu_rasterizer.h
new file mode 100644
index 0000000000000000000000000000000000000000..9abc8cea6affd1784de1ca2471383238b76a0d43
--- /dev/null
+++ b/cc/resources/gpu_rasterizer.h
@@ -0,0 +1,78 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_RESOURCES_GPU_RASTERIZER_H_
+#define CC_RESOURCES_GPU_RASTERIZER_H_
+
+#include "base/memory/scoped_vector.h"
+#include "cc/resources/resource_pool.h"
+#include "cc/resources/tile.h"
+
+namespace cc {
+
+class ContextProvider;
+class ResourceProvider;
+class RenderingStatsInstrumentation;
+
+class CC_EXPORT GpuRasterizerClient {
+ public:
+ virtual void OnGpuRasterTaskCompleted(
+ Tile* tile, scoped_ptr<ScopedResource> resource) = 0;
+};
+
+class CC_EXPORT GpuRasterizer {
+ public:
+ static scoped_ptr<GpuRasterizer> Create(
+ ContextProvider* context_provider,
+ ResourceProvider* resource_provider);
+ virtual ~GpuRasterizer();
+
+ void SetClient(GpuRasterizerClient* client);
+
+ class RasterTask {
+ public:
+ RasterTask(Tile* tile, scoped_ptr<ScopedResource> resource);
+ ~RasterTask();
+
+ private:
+ friend class GpuRasterizer;
+ friend class FakeGpuRasterizer;
+
+ Tile* tile_;
+ scoped_ptr<ScopedResource> resource_;
+ };
+
+ typedef ScopedVector<RasterTask> RasterTaskVector;
+
+ class CC_EXPORT Queue {
+ public:
+ Queue();
+ ~Queue();
+
+ void Append(Tile* tile, scoped_ptr<ScopedResource> resource);
+
+ private:
+ friend class GpuRasterizer;
+ friend class FakeGpuRasterizer;
+
+ RasterTaskVector raster_tasks_;
+ };
+
+ virtual void Rasterize(
+ const Queue& queue,
+ RenderingStatsInstrumentation* rendering_stats_instrumentation);
+
+ protected:
+ GpuRasterizer(
+ ContextProvider* context_provider,
+ ResourceProvider* resource_provider);
+
+ GpuRasterizerClient* client_;
+ ContextProvider* context_provider_;
+ ResourceProvider* resource_provider_;
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_GPU_RASTERIZER_H_
« 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