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

Unified Diff: bench/nanobench.cpp

Issue 707723005: Revert of Get gpudft support working in dm, gm, nanobench and bench_pictures (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 | « no previous file | dm/DM.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/nanobench.cpp
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index dbca3504226010aabffe3916664038208014c930..31b69fa6e2bbc4e672ea0a5f99cc8d19a615a37e 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -277,10 +277,8 @@
int samples;
#if SK_SUPPORT_GPU
GrContextFactory::GLContextType ctxType;
- bool useDFText;
#else
int bogusInt;
- bool bogusBool;
#endif
};
@@ -323,11 +321,10 @@
// Append all configs that are enabled and supported.
static void create_configs(SkTDArray<Config>* configs) {
- #define CPU_CONFIG(name, backend, color, alpha) \
- if (is_cpu_config_allowed(#name)) { \
- Config config = { #name, Benchmark::backend, color, alpha, 0, \
- kBogusGLContextType, false }; \
- configs->push(config); \
+ #define CPU_CONFIG(name, backend, color, alpha) \
+ if (is_cpu_config_allowed(#name)) { \
+ Config config = { #name, Benchmark::backend, color, alpha, 0, kBogusGLContextType }; \
+ configs->push(config); \
}
if (FLAGS_cpu) {
@@ -337,7 +334,7 @@
}
#if SK_SUPPORT_GPU
- #define GPU_CONFIG(name, ctxType, samples, useDFText) \
+ #define GPU_CONFIG(name, ctxType, samples) \
if (is_gpu_config_allowed(#name, GrContextFactory::ctxType, samples)) { \
Config config = { \
#name, \
@@ -345,20 +342,18 @@
kN32_SkColorType, \
kPremul_SkAlphaType, \
samples, \
- GrContextFactory::ctxType, \
- useDFText }; \
+ GrContextFactory::ctxType }; \
configs->push(config); \
}
if (FLAGS_gpu) {
- GPU_CONFIG(gpu, kNative_GLContextType, 0, false)
- GPU_CONFIG(msaa4, kNative_GLContextType, 4, false)
- GPU_CONFIG(msaa16, kNative_GLContextType, 16, false)
- GPU_CONFIG(nvprmsaa4, kNVPR_GLContextType, 4, false)
- GPU_CONFIG(nvprmsaa16, kNVPR_GLContextType, 16, false)
- GPU_CONFIG(gpudft, kNative_GLContextType, 0, true)
- GPU_CONFIG(debug, kDebug_GLContextType, 0, false)
- GPU_CONFIG(nullgpu, kNull_GLContextType, 0, false)
+ GPU_CONFIG(gpu, kNative_GLContextType, 0)
+ GPU_CONFIG(msaa4, kNative_GLContextType, 4)
+ GPU_CONFIG(msaa16, kNative_GLContextType, 16)
+ GPU_CONFIG(nvprmsaa4, kNVPR_GLContextType, 4)
+ GPU_CONFIG(nvprmsaa16, kNVPR_GLContextType, 16)
+ GPU_CONFIG(debug, kDebug_GLContextType, 0)
+ GPU_CONFIG(nullgpu, kNull_GLContextType, 0)
#ifdef SK_ANGLE
GPU_CONFIG(angle, kANGLE_GLContextType, 0)
#endif
@@ -382,10 +377,8 @@
}
#if SK_SUPPORT_GPU
else if (Benchmark::kGPU_Backend == config.backend) {
- uint32_t flags = config.useDFText ? SkSurfaceProps::kUseDistanceFieldFonts_Flag : 0;
- SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
target->surface.reset(SkSurface::NewRenderTarget(gGrFactory->get(config.ctxType), info,
- config.samples, &props));
+ config.samples));
target->gl = gGrFactory->getGLContext(config.ctxType);
}
#endif
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698