From 30b1aafab054488297f5ad0705938d8bae618be4 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Tue, 12 Nov 2013 19:36:14 +0000 Subject: [PATCH] [PDF] Speculative fix for chrome crash w/ SRC xfer mode. BUG=chromium:316546 R=edisonn@google.com, reed@google.com Author: vandebo@chromium.org Review URL: https://codereview.chromium.org/61153003 git-svn-id: http://skia.googlecode.com/svn/trunk@12253 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/pdf/SkPDFDevice.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index ff7dd2cd92..0b15d6ab43 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -1948,7 +1948,14 @@ void SkPDFDevice::finishContentEntry(const SkXfermode::Mode xfermode, SkPaint stockPaint; - if (xfermode == SkXfermode::kClear_Mode) { + if (xfermode == SkXfermode::kSrcATop_Mode) { + ScopedContentEntry content(this, &clipStack, clipRegion, identity, + stockPaint); + if (content.entry()) { + SkPDFUtils::DrawFormXObject(this->addXObjectResource(dst), + &content.entry()->fContent); + } + } else if (xfermode == SkXfermode::kClear_Mode || !srcFormXObject.get()) { return; } else if (xfermode == SkXfermode::kSrc_Mode || xfermode == SkXfermode::kDstATop_Mode) { @@ -1962,13 +1969,6 @@ void SkPDFDevice::finishContentEntry(const SkXfermode::Mode xfermode, if (xfermode == SkXfermode::kSrc_Mode) { return; } - } else if (xfermode == SkXfermode::kSrcATop_Mode) { - ScopedContentEntry content(this, &clipStack, clipRegion, identity, - stockPaint); - if (content.entry()) { - SkPDFUtils::DrawFormXObject(this->addXObjectResource(dst), - &content.entry()->fContent); - } } SkASSERT(xfermode == SkXfermode::kSrcIn_Mode ||