Simplify canvas calls in SkDocument_PDF

As suggested by reed@ in http://crrev.com/711133002

TBR=reed@google.com

Review URL: https://codereview.chromium.org/707533003
This commit is contained in:
halcanary 2014-11-10 14:22:14 -08:00 committed by Commit bot
parent 207a1c96ee
commit be519ad718

View File

@ -44,8 +44,8 @@ protected:
fDevice->setRasterDpi(fRasterDpi);
}
fCanvas = SkNEW_ARGS(SkCanvas, (fDevice));
fCanvas->clipRect(trimBox);
fCanvas->translate(trimBox.x(), trimBox.y());
fCanvas->clipRect(SkRect::MakeWH(trimBox.width(), trimBox.height()));
return fCanvas;
}