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

Unified Diff: src/gpu/GrTextContext.cpp

Issue 25736002: Add support to dump font cache texture for debug purposes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Add stencil flag Created 7 years, 2 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/GrContext.cpp ('k') | src/gpu/GrTextStrike.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextContext.cpp
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index 1f25c906fbe1d262a57be58352a8de2a5e740d06..5a6183965cf6422585baa7befa56299138c90488 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -16,11 +16,15 @@
#include "GrTextStrike.h"
#include "GrTextStrike_impl.h"
#include "SkPath.h"
+#include "SkRTConf.h"
#include "SkStrokeRec.h"
#include "effects/GrCustomCoordsTextureEffect.h"
static const int kGlyphCoordsAttributeIndex = 1;
+SK_CONF_DECLARE(bool, c_DumpFontCache, "gpu.dumpFontCache", false,
+ "Dump the contents of the font cache before every purge.");
+
void GrTextContext::flushGlyphs() {
if (NULL == fDrawTarget) {
return;
@@ -161,6 +165,12 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
goto HAS_ATLAS;
}
+ if (c_DumpFontCache) {
+#ifdef SK_DEVELOPER
+ fContext->getFontCache()->dump();
+#endif
+ }
+
// before we purge the cache, we must flush any accumulated draws
this->flushGlyphs();
fContext->flush();
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrTextStrike.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698