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

Unified Diff: cc/resources/resource_provider.cc

Issue 363563006: cc: Hide Gpu Rasterization details in Resource Provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 79104d7ef309afa931109763680b84d7c015c269..245195d72d5e78be2d447a6ed7eb03b865bab034 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -2263,6 +2263,38 @@ GLint ResourceProvider::GetActiveTextureUnit(GLES2Interface* gl) {
return active_unit;
}
+void ResourceProvider::PushGroupMarker(const char* name) {
+ GLES2Interface* gl = ContextGL();
+ DCHECK(gl);
+
+ gl->PushGroupMarkerEXT(0, name);
+}
+
+void ResourceProvider::PopGroupMarker() {
+ GLES2Interface* gl = ContextGL();
+ DCHECK(gl);
+
+ gl->PopGroupMarkerEXT();
+}
+
+void ResourceProvider::ResetGpuContext() {
+ class GrContext* gr_context = GrContext();
+ // TODO(alokp): Implement TestContextProvider::GrContext().
+ if (!gr_context)
+ return;
+
+ gr_context->resetContext();
+}
+
+void ResourceProvider::FlushGpuContext() {
+ class GrContext* gr_context = GrContext();
+ // TODO(alokp): Implement TestContextProvider::GrContext().
+ if (!gr_context)
+ return;
+
+ gr_context->flush();
+}
+
GLES2Interface* ResourceProvider::ContextGL() const {
ContextProvider* context_provider = output_surface_->context_provider();
return context_provider ? context_provider->ContextGL() : NULL;

Powered by Google App Engine
This is Rietveld 408576698