Index: src/gpu/GrRecordReplaceDraw.cpp |
diff --git a/src/gpu/GrRecordReplaceDraw.cpp b/src/gpu/GrRecordReplaceDraw.cpp |
index bca92558567cb8438ae6e0406bfe084cdd815840..28f27dfc1c7821642a18a3f2050e8954a7a71a21 100644 |
--- a/src/gpu/GrRecordReplaceDraw.cpp |
+++ b/src/gpu/GrRecordReplaceDraw.cpp |
@@ -35,22 +35,22 @@ static inline void draw_replacement_bitmap(GrCachedLayer* layer, SkCanvas* canva |
!layer->isAtlased() ? layer->rect().height() : layer->texture()->height(), |
&bm); |
+ canvas->save(); |
+ canvas->setMatrix(SkMatrix::I()); |
if (layer->isAtlased()) { |
const SkRect src = SkRect::Make(layer->rect()); |
const SkRect dst = SkRect::Make(layer->srcIR()); |
SkASSERT(layer->offset().isZero()); |
- canvas->save(); |
- canvas->setMatrix(SkMatrix::I()); |
canvas->drawBitmapRect(bm, src, dst, layer->paint(), SkCanvas::kStrict_SrcRectConstraint); |
- canvas->restore(); |
} else { |
- canvas->drawSprite(bm, |
- layer->srcIR().fLeft + layer->offset().fX, |
- layer->srcIR().fTop + layer->offset().fY, |
+ canvas->drawBitmap(bm, |
+ SkIntToScalar(layer->srcIR().fLeft + layer->offset().fX), |
+ SkIntToScalar(layer->srcIR().fTop + layer->offset().fY), |
layer->paint()); |
} |
+ canvas->restore(); |
} |
// Used by GrRecordReplaceDraw. It intercepts nested drawPicture calls and |