diff options
author | 2017-02-22 16:32:34 -0500 | |
---|---|---|
committer | 2017-02-22 22:48:43 +0000 | |
commit | a41c2aa338713b1f18821a90dbca46b4c61c6c66 (patch) | |
tree | a57526bba09ce1e761d7dd2083cc10094df8a5a2 /src/pdf | |
parent | e2d78ec818a5bf563db6410c09b930e4c6a67706 (diff) |
SkPDF: do not use SkRegion in populateGraphicStateEntryFromPaint()
Change-Id: I3eb192426f5b648fe7ad7db3c8dac42771be0197
Reviewed-on: https://skia-review.googlesource.com/8893
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'src/pdf')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index e3524463dc..36c1418d68 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -2005,14 +2005,15 @@ void SkPDFDevice::populateGraphicStateEntryFromPaint( // PDF doesn't support kClamp_TileMode, so we simulate it by making // a pattern the size of the current clip. - SkIRect bounds = clipRegion.getBounds(); + SkRect clipStackBounds = clipStack.bounds(this->getGlobalBounds()); + SkIPoint deviceOrigin = this->getOrigin(); + clipStackBounds.offset(-deviceOrigin.x(), -deviceOrigin.y()); // We need to apply the initial transform to bounds in order to get // bounds in a consistent coordinate system. - SkRect boundsTemp; - boundsTemp.set(bounds); - fInitialTransform.mapRect(&boundsTemp); - boundsTemp.roundOut(&bounds); + fInitialTransform.mapRect(&clipStackBounds); + SkIRect bounds; + clipStackBounds.roundOut(&bounds); SkScalar rasterScale = SkIntToScalar(fRasterDpi) / DPI_FOR_RASTER_SCALE_ONE; |