[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
This commit is contained in:
parent
efc51b79a2
commit
30b1aafab0
@ -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 ||
|
||||
|
Loading…
Reference in New Issue
Block a user