Chromium Code Reviews| Index: src/pdf/SkPDFUtils.cpp |
| diff --git a/src/pdf/SkPDFUtils.cpp b/src/pdf/SkPDFUtils.cpp |
| index 90e2058d24f4bd601f76c440ccb28b408233ee42..16abc2f9f252b381a26a4d8c016361018d71c712 100644 |
| --- a/src/pdf/SkPDFUtils.cpp |
| +++ b/src/pdf/SkPDFUtils.cpp |
| @@ -11,6 +11,7 @@ |
| #include "SkGeometry.h" |
| #include "SkPaint.h" |
| #include "SkPath.h" |
| +#include "SkPDFResourceDict.h" |
| #include "SkPDFUtils.h" |
| #include "SkStream.h" |
| #include "SkString.h" |
| @@ -206,14 +207,18 @@ void SkPDFUtils::StrokePath(SkWStream* content) { |
| // static |
| void SkPDFUtils::DrawFormXObject(int objectIndex, SkWStream* content) { |
| - content->writeText("/X"); |
| - content->writeDecAsText(objectIndex); |
| + content->writeText("/"); |
| + content->writeText(SkPDFResourceDict::getResourceName( |
|
edisonn
2013/07/17 18:38:22
can we have here a null returned?
ducky
2013/07/17 19:51:25
The current implementation won't return NULL, as i
|
| + SkPDFResourceDict::kXObject_ResourceType, |
| + objectIndex).c_str()); |
| content->writeText(" Do\n"); |
| } |
| // static |
| void SkPDFUtils::ApplyGraphicState(int objectIndex, SkWStream* content) { |
| - content->writeText("/G"); |
| - content->writeDecAsText(objectIndex); |
| + content->writeText("/"); |
| + content->writeText(SkPDFResourceDict::getResourceName( |
|
edisonn
2013/07/17 18:38:22
can we have a null returned here?
ducky
2013/07/17 19:51:25
Same response as above.
|
| + SkPDFResourceDict::kExtGState_ResourceType, |
| + objectIndex).c_str()); |
| content->writeText(" gs\n"); |
| } |