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 "SkPDFResourceDict.h" | 8 #include "SkPDFResourceDict.h" |
| 9 #include "SkPDFTypes.h" |
9 #include "SkPostConfig.h" | 10 #include "SkPostConfig.h" |
10 | 11 |
11 // Sanity check that the values of enum SkPDFResourceType correspond to the | 12 // Sanity check that the values of enum SkPDFResourceType correspond to the |
12 // expected values as defined in the arrays below. | 13 // expected values as defined in the arrays below. |
13 // If these are failing, you may need to update the resource_type_prefixes | 14 // If these are failing, you may need to update the resource_type_prefixes |
14 // and resource_type_names arrays below. | 15 // and resource_type_names arrays below. |
15 static_assert(SkPDFResourceDict::kExtGState_ResourceType == 0, "resource_type_mi
smatch"); | 16 static_assert(SkPDFResourceDict::kExtGState_ResourceType == 0, "resource_type_mi
smatch"); |
16 static_assert(SkPDFResourceDict::kPattern_ResourceType == 1, "resource_type_mism
atch"); | 17 static_assert(SkPDFResourceDict::kPattern_ResourceType == 1, "resource_type_mism
atch"); |
17 static_assert(SkPDFResourceDict::kXObject_ResourceType == 2, "resource_type_mism
atch"); | 18 static_assert(SkPDFResourceDict::kXObject_ResourceType == 2, "resource_type_mism
atch"); |
18 static_assert(SkPDFResourceDict::kFont_ResourceType == 3, "resource_type_mismatc
h"); | 19 static_assert(SkPDFResourceDict::kFont_ResourceType == 3, "resource_type_mismatc
h"); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 add_subdict(*patternResources, kPattern_ResourceType, dict.get()); | 93 add_subdict(*patternResources, kPattern_ResourceType, dict.get()); |
93 } | 94 } |
94 if (xObjectResources) { | 95 if (xObjectResources) { |
95 add_subdict(*xObjectResources, kXObject_ResourceType, dict.get()); | 96 add_subdict(*xObjectResources, kXObject_ResourceType, dict.get()); |
96 } | 97 } |
97 if (fontResources) { | 98 if (fontResources) { |
98 add_subdict(*fontResources, kFont_ResourceType, dict.get()); | 99 add_subdict(*fontResources, kFont_ResourceType, dict.get()); |
99 } | 100 } |
100 return dict; | 101 return dict; |
101 } | 102 } |
OLD | NEW |