Always clear dest in SkBitmap::copyTo's draw path
https://codereview.chromium.org/26268003/ git-svn-id: http://skia.googlecode.com/svn/trunk@11697 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
96b128b760
commit
0197b32bfb
@ -1119,10 +1119,9 @@ bool SkBitmap::copyTo(SkBitmap* dst, Config dstConfig, Allocator* alloc) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// if the src has alpha, we have to clear the dst first
|
// Always clear the dest in case one of the blitters accesses it
|
||||||
if (!src->isOpaque()) {
|
// TODO: switch the allocation of tmpDst to call sk_calloc_throw
|
||||||
tmpDst.eraseColor(SK_ColorTRANSPARENT);
|
tmpDst.eraseColor(SK_ColorTRANSPARENT);
|
||||||
}
|
|
||||||
|
|
||||||
SkCanvas canvas(tmpDst);
|
SkCanvas canvas(tmpDst);
|
||||||
SkPaint paint;
|
SkPaint paint;
|
||||||
|
Loading…
Reference in New Issue
Block a user