Chromium Code Reviews| Index: tests/DeferredCanvasTest.cpp |
| =================================================================== |
| --- tests/DeferredCanvasTest.cpp (revision 12247) |
| +++ tests/DeferredCanvasTest.cpp (working copy) |
| @@ -703,6 +703,10 @@ |
| #if SK_SUPPORT_GPU |
| if (useGpu) { |
| GrContext* context = factory->get(GrContextFactory::kNative_GLContextType); |
| + if (NULL == context) { |
| + return; |
| + } |
| + |
| surface = SkSurface::NewRenderTarget(context, imageSpec); |
| } else { |
| surface = SkSurface::NewRaster(imageSpec); |