Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(680)

Unified Diff: src/pdf/SkPDFUtils.cpp

Issue 19954011: Fix Clang build on SkPDFResourceDict (CL 18977002) (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix style Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFShader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
+ 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(
+ SkPDFResourceDict::kExtGState_ResourceType,
+ objectIndex).c_str());
content->writeText(" gs\n");
}
« no previous file with comments | « src/pdf/SkPDFShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698