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

Unified Diff: src/gpu/GrContext.cpp

Issue 1104343003: remove old text contexts and fontcache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak Created 5 years, 8 months 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 | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrDistanceFieldTextContext.h » ('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 4154005f17b17a178dfbe8bf8cac6e92dc5b2b13..7d315eb32b0349a84cd3ae49ecbcbc4af1c2d694 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -15,10 +15,8 @@
#include "GrBatchTarget.h"
#include "GrBufferAllocPool.h"
#include "GrDefaultGeoProcFactory.h"
-#include "GrFontCache.h"
#include "GrGpuResource.h"
#include "GrGpuResourcePriv.h"
-#include "GrDistanceFieldTextContext.h"
#include "GrDrawTargetCaps.h"
#include "GrGpu.h"
#include "GrIndexBuffer.h"
@@ -98,7 +96,6 @@ GrContext::GrContext(const Options& opts) : fOptions(opts) {
fSoftwarePathRenderer = NULL;
fResourceCache = NULL;
fBatchFontCache = NULL;
- fFontCache = NULL;
fDrawBuffer = NULL;
fDrawBufferVBAllocPool = NULL;
fDrawBufferIBAllocPool = NULL;
@@ -123,8 +120,6 @@ void GrContext::initCommon() {
fResourceCache = SkNEW(GrResourceCache);
fResourceCache->setOverBudgetCallback(OverBudgetCB, this);
- fFontCache = SkNEW_ARGS(GrFontCache, (fGpu));
-
fLayerCache.reset(SkNEW_ARGS(GrLayerCache, (this)));
fAARectRenderer = SkNEW_ARGS(GrAARectRenderer, (fGpu));
@@ -153,7 +148,6 @@ GrContext::~GrContext() {
SkDELETE(fResourceCache);
SkDELETE(fBatchFontCache);
- SkDELETE(fFontCache);
SkDELETE(fDrawBuffer);
SkDELETE(fDrawBufferVBAllocPool);
SkDELETE(fDrawBufferIBAllocPool);
@@ -191,7 +185,6 @@ void GrContext::abandonContext() {
fOvalRenderer->reset();
fBatchFontCache->freeAll();
- fFontCache->freeAll();
fLayerCache->freeAll();
fTextBlobCache->freeAll();
}
@@ -211,7 +204,6 @@ void GrContext::freeGpuResources() {
fOvalRenderer->reset();
fBatchFontCache->freeAll();
- fFontCache->freeAll();
fLayerCache->freeAll();
// a path renderer may be holding onto resources
SkSafeSetNull(fPathRendererChain);
@@ -241,12 +233,7 @@ GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget,
}
}
-#ifdef USE_BITMAP_TEXTBLOBS
return GrAtlasTextContext::Create(this, gpuDevice, leakyProperties, enableDistanceFieldFonts);
-#else
- return GrDistanceFieldTextContext::Create(this, gpuDevice, leakyProperties,
- enableDistanceFieldFonts);
-#endif
}
////////////////////////////////////////////////////////////////////////////////
@@ -466,12 +453,6 @@ void GrContext::drawPaint(GrRenderTarget* rt,
}
}
-#ifdef SK_DEVELOPER
-void GrContext::dumpFontCache() const {
- fFontCache->dump();
-}
-#endif
-
////////////////////////////////////////////////////////////////////////////////
static inline bool is_irect(const SkRect& r) {
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrDistanceFieldTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698