| OLD | NEW |
| 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 "DMJsonWriter.h" | 8 #include "DMJsonWriter.h" |
| 9 #include "DMSrcSink.h" | 9 #include "DMSrcSink.h" |
| 10 #include "DMSrcSinkAndroid.h" | 10 #include "DMSrcSinkAndroid.h" |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 #if SK_SUPPORT_GPU | 824 #if SK_SUPPORT_GPU |
| 825 if (gpu_supported()) { | 825 if (gpu_supported()) { |
| 826 if (const SkCommandLineConfigGpu* gpuConfig = config->asConfigGpu()) { | 826 if (const SkCommandLineConfigGpu* gpuConfig = config->asConfigGpu()) { |
| 827 GrContextFactory::ContextType contextType = gpuConfig->getContextTyp
e(); | 827 GrContextFactory::ContextType contextType = gpuConfig->getContextTyp
e(); |
| 828 GrContextFactory::ContextOptions contextOptions = | 828 GrContextFactory::ContextOptions contextOptions = |
| 829 GrContextFactory::kNone_ContextOptions; | 829 GrContextFactory::kNone_ContextOptions; |
| 830 if (gpuConfig->getUseNVPR()) { | 830 if (gpuConfig->getUseNVPR()) { |
| 831 contextOptions = static_cast<GrContextFactory::ContextOptions>( | 831 contextOptions = static_cast<GrContextFactory::ContextOptions>( |
| 832 contextOptions | GrContextFactory::kEnableNVPR_ContextOption
s); | 832 contextOptions | GrContextFactory::kEnableNVPR_ContextOption
s); |
| 833 } | 833 } |
| 834 if (gpuConfig->getUseInstanced()) { |
| 835 contextOptions = static_cast<GrContextFactory::ContextOptions>( |
| 836 contextOptions | GrContextFactory::kUseInstanced_ContextOpti
ons); |
| 837 } |
| 834 if (SkColorAndColorSpaceAreGammaCorrect(gpuConfig->getColorType(), | 838 if (SkColorAndColorSpaceAreGammaCorrect(gpuConfig->getColorType(), |
| 835 gpuConfig->getColorSpace()))
{ | 839 gpuConfig->getColorSpace()))
{ |
| 836 contextOptions = static_cast<GrContextFactory::ContextOptions>( | 840 contextOptions = static_cast<GrContextFactory::ContextOptions>( |
| 837 contextOptions | GrContextFactory::kRequireSRGBSupport_Conte
xtOptions); | 841 contextOptions | GrContextFactory::kRequireSRGBSupport_Conte
xtOptions); |
| 838 } | 842 } |
| 839 GrContextFactory testFactory; | 843 GrContextFactory testFactory; |
| 840 if (!testFactory.get(contextType, contextOptions)) { | 844 if (!testFactory.get(contextType, contextOptions)) { |
| 841 info("WARNING: can not create GPU context for config '%s'. " | 845 info("WARNING: can not create GPU context for config '%s'. " |
| 842 "GM tests will be skipped.\n", gpuConfig->getTag().c_str())
; | 846 "GM tests will be skipped.\n", gpuConfig->getTag().c_str())
; |
| 843 return nullptr; | 847 return nullptr; |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 #endif | 1434 #endif |
| 1431 } | 1435 } |
| 1432 } // namespace skiatest | 1436 } // namespace skiatest |
| 1433 | 1437 |
| 1434 #if !defined(SK_BUILD_FOR_IOS) | 1438 #if !defined(SK_BUILD_FOR_IOS) |
| 1435 int main(int argc, char** argv) { | 1439 int main(int argc, char** argv) { |
| 1436 SkCommandLineFlags::Parse(argc, argv); | 1440 SkCommandLineFlags::Parse(argc, argv); |
| 1437 return dm_main(); | 1441 return dm_main(); |
| 1438 } | 1442 } |
| 1439 #endif | 1443 #endif |
| OLD | NEW |