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

Side by Side Diff: tests/TestConfigParsing.cpp

Issue 2378713002: Make GPU configs use kRGBA color type not kN32. (Closed)
Patch Set: Created 4 years, 2 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 | tools/flags/SkCommonFlagsConfig.cpp » ('j') | tools/flags/SkCommonFlagsConfig.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 "SkCommonFlagsConfig.h" 8 #include "SkCommonFlagsConfig.h"
9 #include "SkColorSpace.h" 9 #include "SkColorSpace.h"
10 #include "Test.h" 10 #include "Test.h"
(...skipping 29 matching lines...) Expand all
40 REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gpu")); 40 REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gpu"));
41 REPORTER_ASSERT(reporter, configs[0]->getViaParts().count() == 0); 41 REPORTER_ASSERT(reporter, configs[0]->getViaParts().count() == 0);
42 #if SK_SUPPORT_GPU 42 #if SK_SUPPORT_GPU
43 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); 43 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu());
44 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() 44 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType()
45 == GrContextFactory::kNativeGL_ContextType); 45 == GrContextFactory::kNativeGL_ContextType);
46 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR() == false); 46 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR() == false);
47 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseInstanced() == fa lse); 47 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseInstanced() == fa lse);
48 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false ); 48 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false );
49 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0); 49 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0);
50 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorType() == kN32_ SkColorType); 50 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorType() == kRGBA _8888_SkColorType);
51 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorSpace() == null ptr); 51 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorSpace() == null ptr);
52 #endif 52 #endif
53 } 53 }
54 54
55 DEF_TEST(ParseConfigs_OutParam, reporter) { 55 DEF_TEST(ParseConfigs_OutParam, reporter) {
56 // Clears the out parameter. 56 // Clears the out parameter.
57 SkCommandLineFlags::StringArray config1 = make_string_array({"gpu"}); 57 SkCommandLineFlags::StringArray config1 = make_string_array({"gpu"});
58 SkCommandLineConfigArray configs; 58 SkCommandLineConfigArray configs;
59 ParseConfigs(config1, &configs); 59 ParseConfigs(config1, &configs);
60 REPORTER_ASSERT(reporter, configs.count() == 1); 60 REPORTER_ASSERT(reporter, configs.count() == 1);
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 REPORTER_ASSERT(reporter, 396 REPORTER_ASSERT(reporter,
397 configs[i]->getViaParts()[j].equals(expectedConfigs[ i].vias[j])); 397 configs[i]->getViaParts()[j].equals(expectedConfigs[ i].vias[j]));
398 } 398 }
399 } 399 }
400 #if SK_SUPPORT_GPU 400 #if SK_SUPPORT_GPU
401 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); 401 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu());
402 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); 402 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu());
403 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); 403 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu());
404 #endif 404 #endif
405 } 405 }
OLDNEW
« no previous file with comments | « no previous file | tools/flags/SkCommonFlagsConfig.cpp » ('j') | tools/flags/SkCommonFlagsConfig.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698