OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkData.h" | 8 #include "SkData.h" |
9 #include "SkPDFFormXObject.h" | 9 #include "SkPDFFormXObject.h" |
10 #include "SkPDFGraphicState.h" | 10 #include "SkPDFGraphicState.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 SkTSet<SkPDFObject*>* newResourceObjects) { | 68 SkTSet<SkPDFObject*>* newResourceObjects) { |
69 GetResourcesHelper(&fResources, knownResourceObjects, newResourceObjects); | 69 GetResourcesHelper(&fResources, knownResourceObjects, newResourceObjects); |
70 } | 70 } |
71 | 71 |
72 void SkPDFGraphicState::emitObject(SkWStream* stream, SkPDFCatalog* catalog) { | 72 void SkPDFGraphicState::emitObject(SkWStream* stream, SkPDFCatalog* catalog) { |
73 populateDict(); | 73 populateDict(); |
74 SkPDFDict::emitObject(stream, catalog); | 74 SkPDFDict::emitObject(stream, catalog); |
75 } | 75 } |
76 | 76 |
77 // static | 77 // static |
78 size_t SkPDFGraphicState::getOutputSize(SkPDFCatalog* catalog, bool indirect) { | |
79 populateDict(); | |
80 return SkPDFDict::getOutputSize(catalog, indirect); | |
81 } | |
82 | |
83 // static | |
84 SkTDArray<SkPDFGraphicState::GSCanonicalEntry>& SkPDFGraphicState::CanonicalPain
ts() { | 78 SkTDArray<SkPDFGraphicState::GSCanonicalEntry>& SkPDFGraphicState::CanonicalPain
ts() { |
85 CanonicalPaintsMutex().assertHeld(); | 79 CanonicalPaintsMutex().assertHeld(); |
86 static SkTDArray<SkPDFGraphicState::GSCanonicalEntry> gCanonicalPaints; | 80 static SkTDArray<SkPDFGraphicState::GSCanonicalEntry> gCanonicalPaints; |
87 return gCanonicalPaints; | 81 return gCanonicalPaints; |
88 } | 82 } |
89 | 83 |
90 SK_DECLARE_STATIC_MUTEX(gCanonicalPaintsMutex); | 84 SK_DECLARE_STATIC_MUTEX(gCanonicalPaintsMutex); |
91 // static | 85 // static |
92 SkBaseMutex& SkPDFGraphicState::CanonicalPaintsMutex() { | 86 SkBaseMutex& SkPDFGraphicState::CanonicalPaintsMutex() { |
93 return gCanonicalPaintsMutex; | 87 return gCanonicalPaintsMutex; |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 } | 271 } |
278 if (bXfermodeName < 0 || bXfermodeName > SkXfermode::kLastMode || | 272 if (bXfermodeName < 0 || bXfermodeName > SkXfermode::kLastMode || |
279 blend_mode_from_xfermode(bXfermodeName) == NULL) { | 273 blend_mode_from_xfermode(bXfermodeName) == NULL) { |
280 bXfermodeName = SkXfermode::kSrcOver_Mode; | 274 bXfermodeName = SkXfermode::kSrcOver_Mode; |
281 } | 275 } |
282 const char* bXfermodeString = blend_mode_from_xfermode(bXfermodeName); | 276 const char* bXfermodeString = blend_mode_from_xfermode(bXfermodeName); |
283 SkASSERT(bXfermodeString != NULL); | 277 SkASSERT(bXfermodeString != NULL); |
284 | 278 |
285 return strcmp(aXfermodeString, bXfermodeString) == 0; | 279 return strcmp(aXfermodeString, bXfermodeString) == 0; |
286 } | 280 } |
OLD | NEW |