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

Unified Diff: cc/test/test_in_process_context_provider.cc

Issue 143263014: Cleanup GrGLInterface factories in Chromium in order to remove old names and workaround code in Ski… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to ToT Created 6 years, 10 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 | « no previous file | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_in_process_context_provider.cc
diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc
index 579a2e87199fd8b5428134083955a6c24c1af90c..eff0b2c008a37ea1224ccd47b42a8386800aefd2 100644
--- a/cc/test/test_in_process_context_provider.cc
+++ b/cc/test/test_in_process_context_provider.cc
@@ -85,8 +85,6 @@ static void BindGrContextCallback(const GrGLInterface* interface) {
TestInProcessContextProvider* context_provider =
reinterpret_cast<TestInProcessContextProvider*>(interface->fCallbackData);
- // Make sure the gles2 library is initialized first on exactly one thread.
- g_gles2_initializer.Get();
gles2::SetGLContext(context_provider->ContextGL());
}
@@ -94,6 +92,11 @@ class GrContext* TestInProcessContextProvider::GrContext() {
if (gr_context_)
return gr_context_.get();
+ // The GrGLInterface factory will make GL calls using the C GLES2 interface.
+ // Make sure the gles2 library is initialized first on exactly one thread.
+ g_gles2_initializer.Get();
+ gles2::SetGLContext(ContextGL());
+
skia::RefPtr<GrGLInterface> interface =
skia::AdoptRef(skia_bindings::CreateCommandBufferSkiaGLBinding());
interface->fCallback = BindGrContextCallback;
« no previous file with comments | « no previous file | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698