aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleApp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'samplecode/SampleApp.cpp')
-rw-r--r--samplecode/SampleApp.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 3b953f4846..127646d0d7 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -210,7 +210,6 @@ public:
fMSAASampleCount = msaaSampleCount;
SkASSERT(NULL == fCurIntf);
- SkAutoTUnref<const GrGLInterface> glInterface;
switch (win->getDeviceType()) {
case kRaster_DeviceType:
// fallthrough
@@ -218,25 +217,21 @@ public:
// fallthrough
case kGPU_DeviceType:
// all these guys use the native interface
- glInterface.reset(GrGLCreateNativeInterface());
+ fCurIntf = GrGLCreateNativeInterface();
break;
#if SK_ANGLE
case kANGLE_DeviceType:
- glInterface.reset(GrGLCreateANGLEInterface());
+ fCurIntf = GrGLCreateANGLEInterface();
break;
#endif // SK_ANGLE
case kNullGPU_DeviceType:
- glInterface.reset(GrGLCreateNullInterface());
+ fCurIntf = GrGLCreateNullInterface();
break;
default:
SkASSERT(false);
break;
}
- // Currently SampleApp does not use NVPR. TODO: Provide an NVPR device type that is skipped
- // when the driver doesn't support NVPR.
- fCurIntf = GrGLInterfaceRemoveNVPR(glInterface.get());
-
SkASSERT(NULL == fCurContext);
fCurContext = GrContext::Create(kOpenGL_GrBackend, (GrBackendContext) fCurIntf);
@@ -244,8 +239,6 @@ public:
// We need some context and interface to see results
SkSafeUnref(fCurContext);
SkSafeUnref(fCurIntf);
- fCurContext = NULL;
- fCurIntf = NULL;
SkDebugf("Failed to setup 3D");
win->detach();