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

Unified Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp

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
« cc/test/test_context_provider.cc ('K') | « cc/test/test_context_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
index 2c21e797e1e44bd5ec46c29e2c60852486bc14f4..ea4800310ac319fc6eb401ed977ac2542e5f653c 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
@@ -47,8 +47,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/gpu/GrContext.h"
+#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
#include "third_party/skia/include/gpu/gl/GrGLTypes.h"
-#include "third_party/skia/include/gpu/gl/SkNullGLContext.h"
#include "wtf/RefPtr.h"
using testing::AnyNumber;
@@ -75,9 +75,8 @@ public:
: m_context3d(context3d)
, m_gl(gl)
{
- scoped_ptr<SkGLContext> glContext(SkNullGLContext::Create());
- glContext->makeCurrent();
- m_grContext = adoptRef(GrContext::Create(kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(glContext->gl())));
+ RefPtr<const GrGLInterface> glInterface = adoptRef(GrGLCreateNullInterface());
+ m_grContext = adoptRef(GrContext::Create(kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(glInterface.get())));
}
WebGraphicsContext3D* context3d() override
« cc/test/test_context_provider.cc ('K') | « cc/test/test_context_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698