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

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: Reveman's comments. Created 7 years, 1 month 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/output/gl_renderer.cc ('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..dcb7711142666a5108696ded2266c289df98751a
--- /dev/null
+++ b/cc/resources/gpu_rasterizer.h
@@ -0,0 +1,62 @@
+// 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<ResourcePool::Resource> resource,
+ bool was_canceled) = 0;
+};
+
+class CC_EXPORT GpuRasterizer {
+ public:
+ static scoped_ptr<GpuRasterizer> Create(
+ ContextProvider* context_provider,
+ ResourceProvider* resource_provider);
+ ~GpuRasterizer();
+
+ void SetClient(GpuRasterizerClient* client);
+
+ ResourceFormat GetResourceFormat() const { return BGRA_8888; }
reveman 2013/11/27 00:21:38 The GpuRasterizer doesn't care what internal forma
+
+ void PushRasterTask(Tile* tile, scoped_ptr<ResourcePool::Resource> resource);
+ void FlushRasterTasks(
+ RenderingStatsInstrumentation* rendering_stats_instrumentation);
+
+ private:
+ GpuRasterizer(
+ ContextProvider* context_provider,
+ ResourceProvider* resource_provider);
+
+ struct RasterTask {
+ RasterTask(Tile* tile, scoped_ptr<ResourcePool::Resource> resource);
+ ~RasterTask();
+
+ Tile* tile_;
+ scoped_ptr<ResourcePool::Resource> resource_;
+ };
+ typedef ScopedVector<RasterTask> RasterTaskVector;
+
+ GpuRasterizerClient* client_;
+ ContextProvider* context_provider_;
+ ResourceProvider* resource_provider_;
+ RasterTaskVector raster_tasks_;
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_GPU_RASTERIZER_H_
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/resources/gpu_rasterizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698