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 "CrashHandler.h" | 8 #include "CrashHandler.h" |
9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 #if SK_SUPPORT_GPU | 812 #if SK_SUPPORT_GPU |
813 if (gpu_supported()) { | 813 if (gpu_supported()) { |
814 if (const SkCommandLineConfigGpu* gpuConfig = config->asConfigGpu()) { | 814 if (const SkCommandLineConfigGpu* gpuConfig = config->asConfigGpu()) { |
815 GrContextFactory::GLContextType contextType = gpuConfig->getContextT
ype(); | 815 GrContextFactory::GLContextType contextType = gpuConfig->getContextT
ype(); |
816 GrContextFactory::GLContextOptions contextOptions = | 816 GrContextFactory::GLContextOptions contextOptions = |
817 GrContextFactory::kNone_GLContextOptions; | 817 GrContextFactory::kNone_GLContextOptions; |
818 if (gpuConfig->getUseNVPR()) { | 818 if (gpuConfig->getUseNVPR()) { |
819 contextOptions = static_cast<GrContextFactory::GLContextOptions>
( | 819 contextOptions = static_cast<GrContextFactory::GLContextOptions>
( |
820 contextOptions | GrContextFactory::kEnableNVPR_GLContextOpti
ons); | 820 contextOptions | GrContextFactory::kEnableNVPR_GLContextOpti
ons); |
821 } | 821 } |
| 822 if (kSRGB_SkColorProfileType == gpuConfig->getProfileType() || |
| 823 kRGBA_F16_SkColorType == gpuConfig->getColorType()) { |
| 824 contextOptions = static_cast<GrContextFactory::GLContextOptions>
( |
| 825 contextOptions | GrContextFactory::kRequireSRGBSupport_GLCon
textOptions); |
| 826 } |
822 GrContextFactory testFactory; | 827 GrContextFactory testFactory; |
823 if (!testFactory.get(contextType, contextOptions)) { | 828 if (!testFactory.get(contextType, contextOptions)) { |
824 info("WARNING: can not create GPU context for config '%s'. " | 829 info("WARNING: can not create GPU context for config '%s'. " |
825 "GM tests will be skipped.\n", gpuConfig->getTag().c_str())
; | 830 "GM tests will be skipped.\n", gpuConfig->getTag().c_str())
; |
826 return nullptr; | 831 return nullptr; |
827 } | 832 } |
828 return new GPUSink(contextType, contextOptions, gpuConfig->getSample
s(), | 833 return new GPUSink(contextType, contextOptions, gpuConfig->getSample
s(), |
829 gpuConfig->getUseDIText(), gpuConfig->getColorTyp
e(), | 834 gpuConfig->getUseDIText(), gpuConfig->getColorTyp
e(), |
830 gpuConfig->getProfileType(), FLAGS_gpu_threading)
; | 835 gpuConfig->getProfileType(), FLAGS_gpu_threading)
; |
831 } | 836 } |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 Reporter* reporter, | 1498 Reporter* reporter, |
1494 GrContextFactory* fac
tory); | 1499 GrContextFactory* fac
tory); |
1495 } // namespace skiatest | 1500 } // namespace skiatest |
1496 | 1501 |
1497 #if !defined(SK_BUILD_FOR_IOS) | 1502 #if !defined(SK_BUILD_FOR_IOS) |
1498 int main(int argc, char** argv) { | 1503 int main(int argc, char** argv) { |
1499 SkCommandLineFlags::Parse(argc, argv); | 1504 SkCommandLineFlags::Parse(argc, argv); |
1500 return dm_main(); | 1505 return dm_main(); |
1501 } | 1506 } |
1502 #endif | 1507 #endif |
OLD | NEW |