Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: src/gpu/GrContext.cpp

Issue 704563004: Revert of Add mock context and use in ResourceCacheTest. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698