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

Unified Diff: cc/resources/resource_provider.h

Issue 363563006: cc: Hide Gpu Rasterization details in Resource Provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update unit/perf tests Create function for gpurasterworkerpool Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/raster_worker_pool_unittest.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index e56f9f9a22a66f148ba4f904f1f0dcb675a0f5d9..5a828b1197442f5a7f85698606332e5da6142311 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -306,6 +306,20 @@ class CC_EXPORT ResourceProvider {
DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockSoftware);
};
+ // The following class is needed to modify GL resources using GPU
+ // raster. The user must ensure that they only use GPU raster on
+ // GL resources while an instance of this class is alive.
+ class CC_EXPORT ScopedGpuRaster {
+ public:
+ ScopedGpuRaster(ResourceProvider* resource_provider);
+ ~ScopedGpuRaster();
+
+ private:
+ ResourceProvider* resource_provider_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedGpuRaster);
+ };
+
class Fence : public base::RefCounted<Fence> {
public:
Fence() {}
@@ -627,6 +641,9 @@ class CC_EXPORT ResourceProvider {
gpu::gles2::GLES2Interface* ContextGL() const;
class GrContext* GrContext() const;
+ void BeginGpuRaster();
+ void EndGpuRaster();
+
OutputSurface* output_surface_;
SharedBitmapManager* shared_bitmap_manager_;
bool lost_output_surface_;
« no previous file with comments | « cc/resources/raster_worker_pool_unittest.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698