Alan Screen | 2ed2550 | 2022-09-22 01:52:07 +0000 | [diff] [blame] | 1 | // Copyright 2022 The PDFium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "testing/command_line_helpers.h" |
| 6 | |
| 7 | bool ParseSwitchKeyValue(const std::string& arg, |
| 8 | const std::string& key, |
| 9 | std::string* value) { |
| 10 | if (arg.size() <= key.size() || arg.compare(0, key.size(), key) != 0) |
| 11 | return false; |
| 12 | |
| 13 | *value = arg.substr(key.size()); |
| 14 | return true; |
| 15 | } |
| 16 | |
| 17 | FPDF_RENDERER_TYPE GetDefaultRendererType() { |
| 18 | #if defined(_SKIA_SUPPORT_) |
| 19 | return FPDF_RENDERERTYPE_SKIA; |
| 20 | #else |
| 21 | return FPDF_RENDERERTYPE_AGG; |
| 22 | #endif |
| 23 | } |