aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-08 15:42:01 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-08 15:42:01 +0000
commit672588b684d484dce6ae251e9e163e4a46924322 (patch)
treec0fd674c6a905b9f7e4f9f8e58326653ab3fe816 /tools
parentc75b25af9e46019b13cde1e642a63b7c253ea5f4 (diff)
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
Diffstat (limited to 'tools')
-rw-r--r--tools/PictureRenderer.cpp12
-rw-r--r--tools/render_pdfs_main.cpp13
2 files changed, 4 insertions, 21 deletions
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index b61288a2bd..53654b923f 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -340,16 +340,8 @@ SkCanvas* RecordPictureRenderer::setupCanvas(int width, int height) {
return NULL;
}
-static SkData* encode_bitmap_to_data(size_t* offset, const SkBitmap& bm) {
- SkPixelRef* pr = bm.pixelRef();
- if (pr != NULL) {
- SkData* data = pr->refEncodedData();
- if (data != NULL) {
- *offset = bm.pixelRefOffset();
- return data;
- }
- }
- *offset = 0;
+// the size_t* parameter is deprecated, so we ignore it
+static SkData* encode_bitmap_to_data(size_t*, const SkBitmap& bm) {
return SkImageEncoder::EncodeData(bm, SkImageEncoder::kPNG_Type, 100);
}
diff --git a/tools/render_pdfs_main.cpp b/tools/render_pdfs_main.cpp
index e07664c304..07c894f753 100644
--- a/tools/render_pdfs_main.cpp
+++ b/tools/render_pdfs_main.cpp
@@ -82,7 +82,8 @@ static bool replace_filename_extension(SkString* path,
}
int gJpegQuality = 100;
-static SkData* encode_to_dct_data(size_t* pixelRefOffset, const SkBitmap& bitmap) {
+// the size_t* parameter is deprecated, so we ignore it
+static SkData* encode_to_dct_data(size_t*, const SkBitmap& bitmap) {
if (gJpegQuality == -1) {
return NULL;
}
@@ -96,16 +97,6 @@ static SkData* encode_to_dct_data(size_t* pixelRefOffset, const SkBitmap& bitmap
bm = copy;
#endif
- SkPixelRef* pr = bm.pixelRef();
- if (pr != NULL) {
- SkData* data = pr->refEncodedData();
- if (data != NULL) {
- *pixelRefOffset = bm.pixelRefOffset();
- return data;
- }
- }
-
- *pixelRefOffset = 0;
return SkImageEncoder::EncodeData(bm,
SkImageEncoder::kJPEG_Type,
gJpegQuality);