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

Unified Diff: bench/nanobench.cpp

Issue 1149773005: Add direct getter for GrCaps to GrContext. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init caps in the right place Created 5 years, 7 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 | « no previous file | include/gpu/GrContext.h » ('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 2fba1f053373c21e9aba473d65b79111f0464aaa..cd15580afbbd14d7fd477188822b9c030d9c7ef3 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -43,6 +43,7 @@
#if SK_SUPPORT_GPU
#include "gl/GrGLDefines.h"
+ #include "GrCaps.h"
#include "GrContextFactory.h"
SkAutoTDelete<GrContextFactory> gGrFactory;
#endif
@@ -372,7 +373,7 @@ static bool is_gpu_config_allowed(const char* name, GrContextFactory::GLContextT
return false;
}
if (const GrContext* ctx = gGrFactory->get(ctxType)) {
- return sampleCnt <= ctx->getMaxSampleCount();
+ return sampleCnt <= ctx->caps()->maxSampleCount();
}
return false;
}
« no previous file with comments | « no previous file | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698