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

Side by Side Diff: dm/DM.cpp

Issue 1873313002: Convert some unit tests from running on GL contexts to running on all contexts (Closed) Base URL: https://skia.googlesource.com/skia.git@vkcfg
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | tests/GpuColorFilterTest.cpp » ('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 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 bool IsNullGLContextType(int) { return false; } 1435 bool IsNullGLContextType(int) { return false; }
1436 #endif 1436 #endif
1437 1437
1438 void RunWithGPUTestContexts(GrContextTestFn* test, GrContextTypeFilterFn* contex tTypeFilter, 1438 void RunWithGPUTestContexts(GrContextTestFn* test, GrContextTypeFilterFn* contex tTypeFilter,
1439 Reporter* reporter, GrContextFactory* factory) { 1439 Reporter* reporter, GrContextFactory* factory) {
1440 #if SK_SUPPORT_GPU 1440 #if SK_SUPPORT_GPU
1441 1441
1442 for (int typeInt = 0; typeInt < GrContextFactory::kContextTypeCnt; ++typeInt ) { 1442 for (int typeInt = 0; typeInt < GrContextFactory::kContextTypeCnt; ++typeInt ) {
1443 GrContextFactory::ContextType contextType = (GrContextFactory::ContextTy pe) typeInt; 1443 GrContextFactory::ContextType contextType = (GrContextFactory::ContextTy pe) typeInt;
1444 ContextInfo ctxInfo = factory->getContextInfo(contextType); 1444 ContextInfo ctxInfo = factory->getContextInfo(contextType);
1445 if (!(*contextTypeFilter)(contextType)) { 1445 if (contextTypeFilter && !(*contextTypeFilter)(contextType)) {
1446 continue; 1446 continue;
1447 } 1447 }
1448 // Use "native" instead of explicitly trying OpenGL and OpenGL ES. Do no t use GLES on, 1448 // Use "native" instead of explicitly trying OpenGL and OpenGL ES. Do no t use GLES on,
1449 // desktop since tests do not account for not fixing http://skbug.com/28 09 1449 // desktop since tests do not account for not fixing http://skbug.com/28 09
1450 if (contextType == GrContextFactory::kGL_ContextType || 1450 if (contextType == GrContextFactory::kGL_ContextType ||
1451 contextType == GrContextFactory::kGLES_ContextType) { 1451 contextType == GrContextFactory::kGLES_ContextType) {
1452 if (contextType != GrContextFactory::kNativeGL_ContextType) { 1452 if (contextType != GrContextFactory::kNativeGL_ContextType) {
1453 continue; 1453 continue;
1454 } 1454 }
1455 } 1455 }
1456 if (ctxInfo.fGrContext) { 1456 if (ctxInfo.fGrContext) {
1457 (*test)(reporter, ctxInfo); 1457 (*test)(reporter, ctxInfo);
1458 } 1458 }
1459 ctxInfo = factory->getContextInfo(contextType, 1459 ctxInfo = factory->getContextInfo(contextType,
1460 GrContextFactory::kEnableNVPR_ContextO ptions); 1460 GrContextFactory::kEnableNVPR_ContextO ptions);
1461 if (ctxInfo.fGrContext) { 1461 if (ctxInfo.fGrContext) {
1462 (*test)(reporter, ctxInfo); 1462 (*test)(reporter, ctxInfo);
1463 } 1463 }
1464 } 1464 }
1465 #endif 1465 #endif
1466 } 1466 }
1467 } // namespace skiatest 1467 } // namespace skiatest
1468 1468
1469 #if !defined(SK_BUILD_FOR_IOS) 1469 #if !defined(SK_BUILD_FOR_IOS)
1470 int main(int argc, char** argv) { 1470 int main(int argc, char** argv) {
1471 SkCommandLineFlags::Parse(argc, argv); 1471 SkCommandLineFlags::Parse(argc, argv);
1472 return dm_main(); 1472 return dm_main();
1473 } 1473 }
1474 #endif 1474 #endif
OLDNEW
« no previous file with comments | « no previous file | tests/GpuColorFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698