change offset to xy for pixelref subsetting

BUG=
R=scroggo@google.com

Review URL: https://codereview.chromium.org/105893012

git-svn-id: http://skia.googlecode.com/svn/trunk@12958 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 0e43c55..e4c1c30 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -1011,21 +1011,9 @@
         return pict;
     }
 
-    static SkData* bitmap_encoder(size_t* pixelRefOffset, const SkBitmap& bm) {
-        SkPixelRef* pr = bm.pixelRef();
-        if (pr != NULL) {
-            SkData* data = pr->refEncodedData();
-            if (data != NULL) {
-                *pixelRefOffset = bm.pixelRefOffset();
-                return data;
-            }
-        }
-        return NULL;
-    }
-
     static SkPicture* stream_to_new_picture(const SkPicture& src) {
         SkDynamicMemoryWStream storage;
-        src.serialize(&storage, &bitmap_encoder);
+        src.serialize(&storage, NULL);
         SkAutoTUnref<SkStreamAsset> pictReadback(storage.detachAsStream());
         SkPicture* retval = SkPicture::CreateFromStream(pictReadback,
                                                         &SkImageDecoder::DecodeMemory);
@@ -1474,7 +1462,7 @@
              "features in PDF are rasterized. Must be be in range 0-10000. "
              "Default is 72. N = 0 will disable rasterizing features like "
              "text shadows or perspective bitmaps.");
-static SkData* encode_to_dct_data(size_t* pixelRefOffset, const SkBitmap& bitmap) {
+static SkData* encode_to_dct_data(size_t*, const SkBitmap& bitmap) {
     // Filter output of warnings that JPEG is not available for the image.
     if (bitmap.width() >= 65500 || bitmap.height() >= 65500) return NULL;
     if (FLAGS_pdfJpegQuality == -1) return NULL;
@@ -1492,12 +1480,10 @@
     if (pr != NULL) {
         SkData* data = pr->refEncodedData();
         if (data != NULL) {
-            *pixelRefOffset = bm.pixelRefOffset();
             return data;
         }
     }
 
-    *pixelRefOffset = 0;
     return SkImageEncoder::EncodeData(bm,
                                       SkImageEncoder::kJPEG_Type,
                                       FLAGS_pdfJpegQuality);