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

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

Issue 1819663002: Bind GrContext to GLES2Interfaces in tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@function
Patch Set: Minimal GetString impl for TestGLES2Interface in skcanvas_video_renderer_unittest.cc 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
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 2508eaf257d64132df9a592fb0f466c81607142a..fa71a435e5cb3bf068028d4d0087ea1cdbc0aaff 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
@@ -27,6 +27,7 @@
#include "SkSurface.h"
#include "base/memory/scoped_ptr.h"
#include "gpu/command_buffer/client/gles2_interface.h"
+#include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h"
#include "platform/Task.h"
#include "platform/ThreadSafeFunctional.h"
#include "platform/WaitableEvent.h"
@@ -46,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;
@@ -74,9 +75,9 @@ 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<GrGLInterface> glInterface = adoptRef(new GrGLInterface);
+ skia_bindings::InitGLES2InterfaceBindings(glInterface.get(), gl);
+ m_grContext = adoptRef(GrContext::Create(kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(glInterface.get())));
}
WebGraphicsContext3D* context3d() override
« no previous file with comments | « media/renderers/skcanvas_video_renderer_unittest.cc ('k') | third_party/WebKit/Source/platform/graphics/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698