SkPDF: empty shader boxes bad

BUG=skia:6315
Change-Id: I48172b4deb4c55b08310e8e3d68089cfafeaa951
Reviewed-on: https://skia-review.googlesource.com/9156
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
Hal Canary 2017-03-02 12:42:02 -05:00 committed by Skia Commit-Bot
parent 655f347e28
commit cf2e8c6139

View File

@ -577,6 +577,9 @@ sk_sp<SkPDFObject> SkPDFShader::GetPDFShader(SkPDFDocument* doc,
const SkMatrix& matrix, const SkMatrix& matrix,
const SkIRect& surfaceBBox, const SkIRect& surfaceBBox,
SkScalar rasterScale) { SkScalar rasterScale) {
if (surfaceBBox.isEmpty()) {
return nullptr;
}
SkBitmap image; SkBitmap image;
State state(shader, matrix, surfaceBBox, rasterScale, &image); State state(shader, matrix, surfaceBBox, rasterScale, &image);
return get_pdf_shader_by_state( return get_pdf_shader_by_state(