本文整理汇总了C++中GrContext::dumpFontCache方法的典型用法代码示例。如果您正苦于以下问题:C++ GrContext::dumpFontCache方法的具体用法?C++ GrContext::dumpFontCache怎么用?C++ GrContext::dumpFontCache使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GrContext
的用法示例。
在下文中一共展示了GrContext::dumpFontCache方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tool_main
int tool_main(int argc, char** argv) {
SkCommandLineFlags::SetUsage("Render .skp files.");
SkCommandLineFlags::Parse(argc, argv);
if (FLAGS_readPath.isEmpty()) {
SkDebugf(".skp files or directories are required.\n");
exit(-1);
}
if (FLAGS_maxComponentDiff < 0 || FLAGS_maxComponentDiff > 256) {
SkDebugf("--maxComponentDiff must be between 0 and 256\n");
exit(-1);
}
if (FLAGS_maxComponentDiff != 256 && !FLAGS_validate) {
SkDebugf("--maxComponentDiff requires --validate\n");
exit(-1);
}
if (FLAGS_clone < 0) {
SkDebugf("--clone must be >= 0. Was %i\n", FLAGS_clone);
exit(-1);
}
if (FLAGS_writeEncodedImages) {
if (FLAGS_writePath.isEmpty()) {
SkDebugf("--writeEncodedImages requires --writePath\n");
exit(-1);
}
if (FLAGS_deferImageDecoding) {
SkDebugf("--writeEncodedImages is not compatible with --deferImageDecoding\n");
exit(-1);
}
}
SkString errorString;
SkAutoTUnref<sk_tools::PictureRenderer> renderer(parseRenderer(errorString,
kRender_PictureTool));
if (errorString.size() > 0) {
SkDebugf("%s\n", errorString.c_str());
}
if (renderer.get() == NULL) {
exit(-1);
}
SkAutoGraphics ag;
SkString outputDir;
if (FLAGS_writePath.count() == 1) {
outputDir.set(FLAGS_writePath[0]);
}
sk_tools::ImageResultsSummary jsonSummary;
sk_tools::ImageResultsSummary* jsonSummaryPtr = NULL;
if (FLAGS_writeJsonSummaryPath.count() == 1) {
jsonSummaryPtr = &jsonSummary;
}
int failures = 0;
for (int i = 0; i < FLAGS_readPath.count(); i ++) {
failures += process_input(FLAGS_readPath[i], &outputDir, *renderer.get(), jsonSummaryPtr);
}
if (failures != 0) {
SkDebugf("Failed to render %i pictures.\n", failures);
return 1;
}
#if SK_SUPPORT_GPU
#if GR_CACHE_STATS
if (renderer->isUsingGpuDevice()) {
GrContext* ctx = renderer->getGrContext();
ctx->printCacheStats();
#ifdef SK_DEVELOPER
ctx->dumpFontCache();
#endif
}
#endif
#endif
if (FLAGS_writeJsonSummaryPath.count() == 1) {
jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]);
}
return 0;
}