diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-10-19 20:43:20 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-10-19 20:43:20 +0000 |
commit | 373a6635b7190b4af4d265fdd4b70f102ec3a6fd (patch) | |
tree | dfa02655ebe3cc2f4f3ead29426c2eb1a80adcf9 /tests | |
parent | 5960d0049585d66efdba058a0930870dafd44079 (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Test.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<SkGLContext> gGLContext; + static SkTLazy<SkNativeGLContext> gGLContext; static SkAutoTUnref<GrContext> 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<GrPlatform3DContext>(gGLContext.get()->gl()); + gGrContext.reset(GrContext::Create(kOpenGL_Shaders_GrEngine, ctx)); } } return gGrContext.get(); |