зеркало из https://github.com/mozilla/moz-skia.git
[PDF] Don't draw empty layers.
Review URL: http://codereview.appspot.com/4527072 git-svn-id: http://skia.googlecode.com/svn/trunk@1410 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
b069c8cfcd
Коммит
ee7a9569f2
|
@ -918,6 +918,13 @@ void SkPDFDevice::drawDevice(const SkDraw& d, SkDevice* device, int x, int y,
|
|||
return;
|
||||
}
|
||||
|
||||
// Assume that a vector capable device means that it's a PDF Device.
|
||||
SkPDFDevice* pdfDevice = static_cast<SkPDFDevice*>(device);
|
||||
if (!pdfDevice->fContentEntries.get() ||
|
||||
!pdfDevice->fContentEntries->fContent.getOffset()) {
|
||||
return;
|
||||
}
|
||||
|
||||
SkMatrix matrix;
|
||||
matrix.setTranslate(SkIntToScalar(x), SkIntToScalar(y));
|
||||
ContentEntryAccessor content(this, d.fClipStack, *d.fClip, matrix, paint);
|
||||
|
@ -925,8 +932,6 @@ void SkPDFDevice::drawDevice(const SkDraw& d, SkDevice* device, int x, int y,
|
|||
return;
|
||||
}
|
||||
|
||||
// Assume that a vector capable device means that it's a PDF Device.
|
||||
SkPDFDevice* pdfDevice = static_cast<SkPDFDevice*>(device);
|
||||
SkPDFFormXObject* xobject = new SkPDFFormXObject(pdfDevice);
|
||||
fXObjectResources.push(xobject); // Transfer reference.
|
||||
SkPDFUtils::DrawFormXObject(fXObjectResources.count() - 1,
|
||||
|
|
Загрузка…
Ссылка в новой задаче