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

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: added scopedgpuraster class 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
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index e56f9f9a22a66f148ba4f904f1f0dcb675a0f5d9..62c5601c93655bf744aebabf12edd92a75dd48d0 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -319,6 +319,21 @@ class CC_EXPORT ResourceProvider {
DISALLOW_COPY_AND_ASSIGN(Fence);
};
+ // This class is used to begin and end gpu rasterization.
reveman 2014/07/01 17:19:01 How about something like this instead: // The fol
sohanjg 2014/07/02 07:40:37 Done.
+ class CC_EXPORT ScopedGpuRaster {
+ public:
+ ScopedGpuRaster(ResourceProvider* resource_provider, const char* name);
+ ~ScopedGpuRaster();
+
+ private:
+ void BeginGpuRaster(const char* name);
+ void EndGpuRaster();
reveman 2014/07/01 17:19:01 How about keeping these as private ResourceProvide
sohanjg 2014/07/02 07:40:37 Done.
+ gpu::gles2::GLES2Interface* gl_;
+ class GrContext* gr_context_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedGpuRaster);
+ };
reveman 2014/07/01 17:19:01 Please move this class above the Fence class so al
sohanjg 2014/07/02 07:40:37 Done.
+
// Returns a canvas for gpu rasterization.
// Call Unmap before the resource can be read or used for compositing.
// It is used for direct gpu rasterization.

Powered by Google App Engine
This is Rietveld 408576698