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

Side by Side Diff: dm/DM.cpp

Issue 1514023002: Run debug gl context for DEF_GPU_TEST_FOR_ALL_CONTEXTS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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 unified diff | Download patch
« no previous file with comments | « no previous file | tests/Test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "CrashHandler.h" 8 #include "CrashHandler.h"
9 #include "DMJsonWriter.h" 9 #include "DMJsonWriter.h"
10 #include "DMSrcSink.h" 10 #include "DMSrcSink.h"
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 1173
1174 template<typename T> 1174 template<typename T>
1175 void RunWithGPUTestContexts(T test, GPUTestContexts testContexts, Reporter* repo rter, 1175 void RunWithGPUTestContexts(T test, GPUTestContexts testContexts, Reporter* repo rter,
1176 GrContextFactory* factory) { 1176 GrContextFactory* factory) {
1177 #if SK_SUPPORT_GPU 1177 #if SK_SUPPORT_GPU
1178 for (int i = 0; i < GrContextFactory::kGLContextTypeCnt; ++i) { 1178 for (int i = 0; i < GrContextFactory::kGLContextTypeCnt; ++i) {
1179 GrContextFactory::GLContextType glCtxType = (GrContextFactory::GLContext Type) i; 1179 GrContextFactory::GLContextType glCtxType = (GrContextFactory::GLContext Type) i;
1180 int contextSelector = kNone_GPUTestContexts; 1180 int contextSelector = kNone_GPUTestContexts;
1181 if (GrContextFactory::IsRenderingGLContext(glCtxType)) { 1181 if (GrContextFactory::IsRenderingGLContext(glCtxType)) {
1182 contextSelector |= kAllRendering_GPUTestContexts; 1182 contextSelector |= kAllRendering_GPUTestContexts;
1183 } 1183 } else if (glCtxType == GrContextFactory::kNative_GLContextType) {
1184 if (glCtxType == GrContextFactory::kNative_GLContextType) {
1185 contextSelector |= kNative_GPUTestContexts; 1184 contextSelector |= kNative_GPUTestContexts;
1186 } 1185 } else if (glCtxType == GrContextFactory::kNull_GLContextType) {
1187 if (glCtxType == GrContextFactory::kNull_GLContextType) {
1188 contextSelector |= kNull_GPUTestContexts; 1186 contextSelector |= kNull_GPUTestContexts;
1187 } else if (glCtxType == GrContextFactory::kDebug_GLContextType) {
1188 contextSelector |= kDebug_GPUTestContexts;
1189 } 1189 }
1190 if ((testContexts & contextSelector) == 0) { 1190 if ((testContexts & contextSelector) == 0) {
1191 continue; 1191 continue;
1192 } 1192 }
1193 if (GrContextFactory::ContextInfo* context = factory->getContextInfo(glC txType)) { 1193 if (GrContextFactory::ContextInfo* context = factory->getContextInfo(glC txType)) {
1194 call_test(test, reporter, context); 1194 call_test(test, reporter, context);
1195 } 1195 }
1196 } 1196 }
1197 #endif 1197 #endif
1198 } 1198 }
1199 1199
1200 template 1200 template
1201 void RunWithGPUTestContexts<TestWithGrContext>(TestWithGrContext test, 1201 void RunWithGPUTestContexts<TestWithGrContext>(TestWithGrContext test,
1202 GPUTestContexts testContexts, 1202 GPUTestContexts testContexts,
1203 Reporter* reporter, 1203 Reporter* reporter,
1204 GrContextFactory* factory); 1204 GrContextFactory* factory);
1205 template 1205 template
1206 void RunWithGPUTestContexts<TestWithGrContextAndGLContext>(TestWithGrContextAndG LContext test, 1206 void RunWithGPUTestContexts<TestWithGrContextAndGLContext>(TestWithGrContextAndG LContext test,
1207 GPUTestContexts testC ontexts, 1207 GPUTestContexts testC ontexts,
1208 Reporter* reporter, 1208 Reporter* reporter,
1209 GrContextFactory* fac tory); 1209 GrContextFactory* fac tory);
1210 } // namespace skiatest 1210 } // namespace skiatest
1211 1211
1212 #if !defined(SK_BUILD_FOR_IOS) 1212 #if !defined(SK_BUILD_FOR_IOS)
1213 int main(int argc, char** argv) { 1213 int main(int argc, char** argv) {
1214 SkCommandLineFlags::Parse(argc, argv); 1214 SkCommandLineFlags::Parse(argc, argv);
1215 return dm_main(); 1215 return dm_main();
1216 } 1216 }
1217 #endif 1217 #endif
OLDNEW
« no previous file with comments | « no previous file | tests/Test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698