aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/PictureRenderer.cpp
diff options
context:
space:
mode:
authorGravatar keyar@chromium.org <keyar@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-20 15:03:33 +0000
committerGravatar keyar@chromium.org <keyar@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-20 15:03:33 +0000
commit0612564bb76ec533d26d87e03368fd81ef97831e (patch)
treed7faf0c40f0ff62c2083f6e1f234aa2cf1876a07 /tools/PictureRenderer.cpp
parent4ea96c5e5449248780acfeb3cef4ec812f955d74 (diff)
The GrContext and the GrFactoryContext are now kept around.
git-svn-id: http://skia.googlecode.com/svn/trunk@5172 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/PictureRenderer.cpp')
-rw-r--r--tools/PictureRenderer.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index e9e14de923..e63cd296d8 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -9,10 +9,7 @@
#include "picture_utils.h"
#if SK_SUPPORT_GPU
-#include "gl/GrGLInterface.h"
-#include "GrContext.h"
#include "SkGpuDevice.h"
-#include "GrContextFactory.h"
#endif
namespace sk_tools {
@@ -44,15 +41,8 @@ void PictureRenderer::init(SkPicture* pict) {
}
#if SK_SUPPORT_GPU
case kGPU_DeviceType: {
-// const GrGLInterface* interface = GrGLCreateNativeInterface();
-// GrContext* context = GrContext::Create(kOpenGL_Shaders_GrEngine,
-// (GrPlatform3DContext) interface);
- fGLContext = new SkNativeGLContext();
- SkASSERT(fGLContext->init(pict->width(), pict->height()));
- GrContextFactory factory;
- GrContext* context = factory.get(GrContextFactory::kNative_GLContextType);
SkAutoTUnref<SkGpuDevice> device(SkNEW_ARGS(SkGpuDevice,
- (context, SkBitmap::kARGB_8888_Config,
+ (fGrContext, SkBitmap::kARGB_8888_Config,
pict->width(), pict->height())));
fCanvas.reset(SkNEW_ARGS(SkCanvas, (device.get())));
break;