aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2016-12-05 10:12:17 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-05 15:44:43 +0000
commitaa2219c69b81b2258862a45cd82cc9fdc06c987a (patch)
tree10f5202cbd422bd3e8313f7b4c13cf118ab695a1 /dm
parent34755e2cbd55497c9b86bf5ad9eb0668f1b6f6bb (diff)
In DM, do quick test to reject context by type first
BUG=skia: Change-Id: Id66a68e47f671cafd7c6128787fbd149faf16c7a Reviewed-on: https://skia-review.googlesource.com/5576 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'dm')
-rw-r--r--dm/DM.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index c3e3af41bd..0d39867ba6 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -1423,11 +1423,7 @@ void RunWithGPUTestContexts(GrContextTestFn* test, GrContextTypeFilterFn* contex
for (int typeInt = 0; typeInt < GrContextFactory::kContextTypeCnt; ++typeInt) {
GrContextFactory::ContextType contextType = (GrContextFactory::ContextType) typeInt;
- ContextInfo ctxInfo = factory->getContextInfo(contextType);
- if (contextTypeFilter && !(*contextTypeFilter)(contextType)) {
- continue;
- }
- // Use "native" instead of explicitly trying OpenGL and OpenGL ES. Do not use GLES on,
+ // Use "native" instead of explicitly trying OpenGL and OpenGL ES. Do not use GLES on
// desktop since tests do not account for not fixing http://skbug.com/2809
if (contextType == GrContextFactory::kGL_ContextType ||
contextType == GrContextFactory::kGLES_ContextType) {
@@ -1435,6 +1431,10 @@ void RunWithGPUTestContexts(GrContextTestFn* test, GrContextTypeFilterFn* contex
continue;
}
}
+ ContextInfo ctxInfo = factory->getContextInfo(contextType);
+ if (contextTypeFilter && !(*contextTypeFilter)(contextType)) {
+ continue;
+ }
if (ctxInfo.grContext()) {
(*test)(reporter, ctxInfo);
}