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

Unified Diff: bench/nanobench.cpp

Issue 1490113005: Add config options to run different GPU APIs to dm and nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-03-context-factory-glcontext-type
Patch Set: Created 5 years 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') | dm/DM.cpp » ('J')
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 0e231e711068e317b7c2da13de95ee07aa65d5b7..10cb8de63fde65e8755d4471868b96e1750da495 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -31,6 +31,7 @@
#include "SkCanvas.h"
#include "SkCodec.h"
#include "SkCommonFlags.h"
+#include "SkCommonFlagsConfig.h"
#include "SkData.h"
#include "SkForceLinking.h"
#include "SkGraphics.h"
@@ -170,11 +171,10 @@ struct GPUTarget : public Target {
0;
SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
this->surface.reset(SkSurface::NewRenderTarget(gGrFactory->get(this->config.ctxType,
- kNone_GrGLStandard,
this->config.ctxOptions),
SkSurface::kNo_Budgeted, info,
this->config.samples, &props));
- this->gl = gGrFactory->getContextInfo(this->config.ctxType, kNone_GrGLStandard,
+ this->gl = gGrFactory->getContextInfo(this->config.ctxType,
this->config.ctxOptions)->fGLContext;
if (!this->surface.get()) {
return false;
@@ -392,7 +392,7 @@ static bool is_gpu_config_allowed(const char* name, GrContextFactory::GLContextT
if (!is_cpu_config_allowed(name)) {
return false;
}
- if (const GrContext* ctx = gGrFactory->get(ctxType, kNone_GrGLStandard, ctxOptions)) {
+ if (const GrContext* ctx = gGrFactory->get(ctxType, ctxOptions)) {
return sampleCnt <= ctx->caps()->maxSampleCount();
}
return false;
@@ -1254,7 +1254,7 @@ int nanobench_main() {
if (FLAGS_gpuStats &&
Benchmark::kGPU_Backend == configs[i].backend) {
GrContext* context = gGrFactory->get(configs[i].ctxType,
- kNone_GrGLStandard, configs[i].ctxOptions);
+ configs[i].ctxOptions);
context->printCacheStats();
context->printGpuStats();
}
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | dm/DM.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698