Index: tools/render_pdfs_main.cpp |
diff --git a/tools/render_pdfs_main.cpp b/tools/render_pdfs_main.cpp |
index 8e791d9608dd9b0e1009e9e16aa8ab0cc419f971..dd5f6421fb93af9f784a9cac07360b3b3d3826f0 100644 |
--- a/tools/render_pdfs_main.cpp |
+++ b/tools/render_pdfs_main.cpp |
@@ -166,9 +166,8 @@ static bool pdf_to_stream(SkPicture* picture, |
SkPicture::EncodeBitmap encoder) { |
SkAutoTUnref<SkDocument> pdfDocument( |
SkDocument::CreatePDF(output, NULL, encoder)); |
- SkCanvas* canvas = pdfDocument->beginPage( |
- SkIntToScalar(picture->width()), |
- SkIntToScalar(picture->height())); |
+ SkCanvas* canvas = pdfDocument->beginPage(picture->cullRect().width(), |
+ picture->cullRect().height()); |
canvas->drawPicture(picture); |
canvas->flush(); |
return pdfDocument->close(); |
@@ -255,8 +254,10 @@ int tool_main_core(int argc, char** argv) { |
++failures; |
continue; |
} |
- SkDebugf("[%-4i %6i] %-*s", picture->width(), picture->height(), |
- maximumPathLength, basename.c_str()); |
+ SkDebugf("[%f,%f,%f,%f] %-*s", |
+ picture->cullRect().fLeft, picture->cullRect().fTop, |
+ picture->cullRect().fRight, picture->cullRect().fBottom, |
+ maximumPathLength, basename.c_str()); |
SkAutoTDelete<SkWStream> stream(open_stream(outputDir, files[i])); |
if (!stream.get()) { |