Fix Clang build on SkPDFResourceDict (CL 18977002)

R=edisonn@google.com, vandebo@chromium.org

Author: richardlin@chromium.org

Review URL: https://chromiumcodereview.appspot.com/19954011

git-svn-id: http://skia.googlecode.com/svn/trunk@10295 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pdf/SkPDFUtils.cpp b/src/pdf/SkPDFUtils.cpp
index 90e2058..16abc2f 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 @@
 
 // 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");
 }