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

Unified Diff: cc/test/test_context_provider.cc

Issue 1829363003: Directly use GrGLInterface in cc tests rather than SkNullGLContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix include and similar change to Canvas2DLayerBridgeTest Created 4 years, 9 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 | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_context_provider.cc
diff --git a/cc/test/test_context_provider.cc b/cc/test/test_context_provider.cc
index 734ef790c1aa2a8e5702746ddf0b36bf37f817c0..96a89f778024e1caa255e718c55553fce6335499 100644
--- a/cc/test/test_context_provider.cc
+++ b/cc/test/test_context_provider.cc
@@ -16,7 +16,7 @@
#include "cc/test/test_gles2_interface.h"
#include "cc/test/test_web_graphics_context_3d.h"
#include "third_party/skia/include/gpu/GrContext.h"
-#include "third_party/skia/include/gpu/gl/SkNullGLContext.h"
+#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
namespace cc {
@@ -112,10 +112,10 @@ class GrContext* TestContextProvider::GrContext() {
if (gr_context_)
return gr_context_.get();
- scoped_ptr<class SkGLContext> gl_context(SkNullGLContext::Create());
- gl_context->makeCurrent();
+ auto gl_interface = skia::AdoptRef(GrGLCreateNullInterface());
danakj 2016/03/25 18:09:36 re: past chromium-dev threads, don't use auto for
bsalomon 2016/03/25 19:02:45 Done.
gr_context_ = skia::AdoptRef(GrContext::Create(
- kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(gl_context->gl())));
+ kOpenGL_GrBackend,
+ reinterpret_cast<GrBackendContext>(gl_interface.get())));
// If GlContext is already lost, also abandon the new GrContext.
if (ContextGL()->GetGraphicsResetStatusKHR() != GL_NO_ERROR)
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698