From: Brian Osman Date: Mon, 5 Dec 2016 15:12:17 +0000 (-0500) Subject: In DM, do quick test to reject context by type first X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~55^2~1368 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa2219c69b81b2258862a45cd82cc9fdc06c987a;p=platform%2Fupstream%2FlibSkiaSharp.git 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 Commit-Queue: Brian Osman --- diff --git a/dm/DM.cpp b/dm/DM.cpp index c3e3af4..0d39867 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); }