Revert "Remove SkRefPtr" - r7021

samplecode/ still needs to be updated.

Review URL: https://codereview.appspot.com/7032048

git-svn-id: http://skia.googlecode.com/svn/trunk@7022 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp
index 1b93f6e..429667a 100644
--- a/src/pdf/SkPDFImage.cpp
+++ b/src/pdf/SkPDFImage.cpp
@@ -305,7 +305,8 @@
     if (!doingAlpha && alphaOnly) {
         // For alpha only images, we stretch a single pixel of black for
         // the color/shape part.
-        SkAutoTUnref<SkPDFInt> one(new SkPDFInt(1));
+        SkRefPtr<SkPDFInt> one = new SkPDFInt(1);
+        one->unref();  // SkRefPtr and new both took a reference.
         insert("Width", one.get());
         insert("Height", one.get());
     } else {
@@ -334,12 +335,16 @@
     insertInt("BitsPerComponent", bitsPerComp);
 
     if (config == SkBitmap::kRGB_565_Config) {
-        SkAutoTUnref<SkPDFInt> zeroVal(new SkPDFInt(0));
-        SkAutoTUnref<SkPDFScalar> scale5Val(
-                new SkPDFScalar(SkFloatToScalar(8.2258f)));  // 255/2^5-1
-        SkAutoTUnref<SkPDFScalar> scale6Val(
-                new SkPDFScalar(SkFloatToScalar(4.0476f)));  // 255/2^6-1
-        SkAutoTUnref<SkPDFArray> decodeValue(new SkPDFArray());
+        SkRefPtr<SkPDFInt> zeroVal = new SkPDFInt(0);
+        zeroVal->unref();  // SkRefPtr and new both took a reference.
+        SkRefPtr<SkPDFScalar> scale5Val =
+                new SkPDFScalar(SkFloatToScalar(8.2258f));  // 255/2^5-1
+        scale5Val->unref();  // SkRefPtr and new both took a reference.
+        SkRefPtr<SkPDFScalar> scale6Val =
+                new SkPDFScalar(SkFloatToScalar(4.0476f));  // 255/2^6-1
+        scale6Val->unref();  // SkRefPtr and new both took a reference.
+        SkRefPtr<SkPDFArray> decodeValue = new SkPDFArray();
+        decodeValue->unref();  // SkRefPtr and new both took a reference.
         decodeValue->reserve(6);
         decodeValue->append(zeroVal.get());
         decodeValue->append(scale5Val.get());