| OLD | NEW |
| 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 #ifndef SK_COMMON_FLAGS_CONFIG_H | 8 #ifndef SK_COMMON_FLAGS_CONFIG_H |
| 9 #define SK_COMMON_FLAGS_CONFIG_H | 9 #define SK_COMMON_FLAGS_CONFIG_H |
| 10 | 10 |
| 11 #include "SkCommandLineFlags.h" | 11 #include "SkCommandLineFlags.h" |
| 12 | 12 |
| 13 #if SK_SUPPORT_GPU | 13 #if SK_SUPPORT_GPU |
| 14 #include "GrContextFactory.h" | 14 #include "GrContextFactory.h" |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 DECLARE_string(config); | 17 DECLARE_string(config); |
| 18 | 18 |
| 19 #if SK_SUPPORT_GPU | 19 #if SK_SUPPORT_GPU |
| 20 class SkCommandLineConfigGpu; | 20 class SkCommandLineConfigGpu; |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 // SkCommandLineConfig represents a Skia rendering configuration string. | 23 // SkCommandLineConfig represents a Skia rendering configuration string. |
| 24 // The string has following form: | 24 // The string has following form: |
| 25 // tag: | 25 // tag: |
| 26 // [via-]*backend | 26 // [via-]*backend |
| 27 // where 'backend' consists of chars excluding hyphen | 27 // where 'backend' consists of chars excluding hyphen or "angle-gl" |
| 28 // and each 'via' consists of chars excluding hyphen. | 28 // and each 'via' consists of chars excluding hyphen. |
| 29 class SkCommandLineConfig { | 29 class SkCommandLineConfig { |
| 30 public: | 30 public: |
| 31 SkCommandLineConfig(const SkString& tag, const SkString& backend, | 31 SkCommandLineConfig(const SkString& tag, const SkString& backend, |
| 32 const SkTArray<SkString>& viaParts); | 32 const SkTArray<SkString>& viaParts); |
| 33 virtual ~SkCommandLineConfig(); | 33 virtual ~SkCommandLineConfig(); |
| 34 #if SK_SUPPORT_GPU | 34 #if SK_SUPPORT_GPU |
| 35 virtual const SkCommandLineConfigGpu* asConfigGpu() const { return nullptr;
} | 35 virtual const SkCommandLineConfigGpu* asConfigGpu() const { return nullptr;
} |
| 36 #endif | 36 #endif |
| 37 const SkString& getTag() const { return fTag; } | 37 const SkString& getTag() const { return fTag; } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 SkColorType fColorType; | 73 SkColorType fColorType; |
| 74 sk_sp<SkColorSpace> fColorSpace; | 74 sk_sp<SkColorSpace> fColorSpace; |
| 75 }; | 75 }; |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 typedef SkTArray<SkAutoTDelete<SkCommandLineConfig>, true> SkCommandLineConfigAr
ray; | 78 typedef SkTArray<SkAutoTDelete<SkCommandLineConfig>, true> SkCommandLineConfigAr
ray; |
| 79 void ParseConfigs(const SkCommandLineFlags::StringArray& configList, | 79 void ParseConfigs(const SkCommandLineFlags::StringArray& configList, |
| 80 SkCommandLineConfigArray* outResult); | 80 SkCommandLineConfigArray* outResult); |
| 81 | 81 |
| 82 #endif | 82 #endif |
| OLD | NEW |