From 373a6635b7190b4af4d265fdd4b70f102ec3a6fd Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Wed, 19 Oct 2011 20:43:20 +0000 Subject: Virtualize SkGLContext with subclasses SkNativeGLContext and SkMesaGLContext, allow both in gm Review URL: http://codereview.appspot.com/5307045/ git-svn-id: http://skia.googlecode.com/svn/trunk@2499 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tests/Test.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/Test.cpp') diff --git a/tests/Test.cpp b/tests/Test.cpp index 55d884d255..d91eeedb8f 100644 --- a/tests/Test.cpp +++ b/tests/Test.cpp @@ -8,7 +8,7 @@ #include "Test.h" #include "GrContext.h" -#include "SkGLContext.h" +#include "SkNativeGLContext.h" #include "SkTLazy.h" using namespace skiatest; @@ -79,13 +79,14 @@ bool Test::run() { GrContext* GpuTest::GetContext() { // preserve this order, we want gGrContext destroyed after gEGLContext - static SkTLazy gGLContext; + static SkTLazy gGLContext; static SkAutoTUnref gGrContext; if (NULL == gGrContext.get()) { gGLContext.init(); if (gGLContext.get()->init(800, 600)) { - gGrContext.reset(GrContext::Create(kOpenGL_Shaders_GrEngine, NULL)); + GrPlatform3DContext ctx = reinterpret_cast(gGLContext.get()->gl()); + gGrContext.reset(GrContext::Create(kOpenGL_Shaders_GrEngine, ctx)); } } return gGrContext.get(); -- cgit v1.2.3