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

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: 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
Index: src/gpu/GrTextContext.cpp
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index 1f25c906fbe1d262a57be58352a8de2a5e740d06..7a9df7c8743a2977f3c0c83d36b3dfef9784c333 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,10 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
goto HAS_ATLAS;
}
+ if (c_DumpFontCache) {
+ fContext->getFontCache()->dump();
+ }
+
// before we purge the cache, we must flush any accumulated draws
this->flushGlyphs();
fContext->flush();

Powered by Google App Engine
This is Rietveld 408576698