diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-12 19:36:14 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-12 19:36:14 +0000 |
commit | 30b1aafab054488297f5ad0705938d8bae618be4 (patch) | |
tree | 663f4a0c844b84d0563ef32853ca687d6ffcac9e | |
parent | efc51b79a22348e3c2596e872609a7a4b018e531 (diff) |
[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
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 16 |
1 files 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 || |