[PDF] Fix shaders when the initial transform has a translation.
Fixes chromium bug 115041 Review URL: https://codereview.appspot.com/5849045 git-svn-id: http://skia.googlecode.com/svn/trunk@3420 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
ce47fec10c
commit
293a758929
@ -1408,6 +1408,14 @@ 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();
|
||||
|
||||
// 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);
|
||||
|
||||
pdfShader = SkPDFShader::GetPDFShader(*shader, transform, bounds);
|
||||
SkSafeUnref(pdfShader.get()); // getShader and SkRefPtr both took a ref
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user