aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrContext.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-11-05 12:30:32 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-05 12:30:32 -0800
commitfdcf2c0863cdd5779bd6203d45b77d2daf21f159 (patch)
tree5b3e5ca6914c761bb911d7e964eebb229b7b4ffb /src/gpu/GrContext.cpp
parent31f88675718966bbb7f09718b40de10c7e214739 (diff)
Revert of Add mock context and use in ResourceCacheTest. (patchset #4 id:60001 of https://codereview.chromium.org/702083003/)
Reason for revert: Breaking tests Original issue's description: > Add mock context and use in ResourceCacheTest. > > BUG=skia:2889 > > Committed: https://skia.googlesource.com/skia/+/820dd6c335411aad889c1d7e8a857642ecd87e30 TBR=robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2889 Review URL: https://codereview.chromium.org/704563004
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rwxr-xr-xsrc/gpu/GrContext.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index a456a799c8..5891840ac6 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -121,11 +121,7 @@ bool GrContext::init(GrBackend backend, GrBackendContext backendContext) {
if (NULL == fGpu) {
return false;
}
- this->initCommon();
- return true;
-}
-void GrContext::initCommon() {
fDrawState = SkNEW(GrDrawState);
fGpu->setDrawState(fDrawState);
@@ -145,6 +141,8 @@ void GrContext::initCommon() {
fDidTestPMConversions = false;
this->setupDrawBuffer();
+
+ return true;
}
GrContext::~GrContext() {
@@ -158,14 +156,14 @@ GrContext::~GrContext() {
(*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();