Bug 1238795 - Fix SkGpuDevice::drawBitmapRect to always update clips. r=jrmuizel

This commit is contained in:
Lee Salzman 2016-01-14 15:17:55 -05:00
parent 88ca65cfad
commit c6e53f0d47

View File

@ -1210,9 +1210,9 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
void SkGpuDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, void SkGpuDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
const SkRect* src, const SkRect& origDst, const SkRect* src, const SkRect& origDst,
const SkPaint& paint, SkCanvas::SrcRectConstraint constraint) { const SkPaint& paint, SkCanvas::SrcRectConstraint constraint) {
CHECK_SHOULD_DRAW(draw);
bool alphaOnly = kAlpha_8_SkColorType == bitmap.colorType(); bool alphaOnly = kAlpha_8_SkColorType == bitmap.colorType();
if (bitmap.getTexture()) { if (bitmap.getTexture()) {
CHECK_SHOULD_DRAW(draw);
GrBitmapTextureAdjuster adjuster(&bitmap); GrBitmapTextureAdjuster adjuster(&bitmap);
this->drawTextureProducer(&adjuster, alphaOnly, src, &origDst, constraint, *draw.fMatrix, this->drawTextureProducer(&adjuster, alphaOnly, src, &origDst, constraint, *draw.fMatrix,
fClip, paint); fClip, paint);