Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index a456a799c89af7f1388a68e5919151eebd093d05..5891840ac61bdad12de328ab56f02102564589bf 100755 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -121,11 +121,7 @@ |
if (NULL == fGpu) { |
return false; |
} |
- this->initCommon(); |
- return true; |
-} |
- |
-void GrContext::initCommon() { |
+ |
fDrawState = SkNEW(GrDrawState); |
fGpu->setDrawState(fDrawState); |
@@ -145,6 +141,8 @@ |
fDidTestPMConversions = false; |
this->setupDrawBuffer(); |
+ |
+ return true; |
} |
GrContext::~GrContext() { |
@@ -158,14 +156,14 @@ |
(*fCleanUpData[i].fFunc)(this, fCleanUpData[i].fInfo); |
} |
- SkDELETE(fResourceCache2); |
+ delete fResourceCache2; |
fResourceCache2 = NULL; |
- SkDELETE(fResourceCache); |
+ delete fResourceCache; |
fResourceCache = NULL; |
- SkDELETE(fFontCache); |
- SkDELETE(fDrawBuffer); |
- SkDELETE(fDrawBufferVBAllocPool); |
- SkDELETE(fDrawBufferIBAllocPool); |
+ delete fFontCache; |
+ delete fDrawBuffer; |
+ delete fDrawBufferVBAllocPool; |
+ delete fDrawBufferIBAllocPool; |
fAARectRenderer->unref(); |
fOvalRenderer->unref(); |