Index: src/gpu/GrRecordReplaceDraw.cpp |
diff --git a/src/gpu/GrRecordReplaceDraw.cpp b/src/gpu/GrRecordReplaceDraw.cpp |
index 0ceea3721fb806fdca40c437f39b1ca677613cbf..852c51f4180dd155d9ad1c527d0ed9dc4111c960 100644 |
--- a/src/gpu/GrRecordReplaceDraw.cpp |
+++ b/src/gpu/GrRecordReplaceDraw.cpp |
@@ -21,6 +21,8 @@ |
} |
static inline void draw_replacement_bitmap(GrCachedLayer* layer, SkCanvas* canvas) { |
+ const SkRect src = SkRect::Make(layer->rect()); |
+ const SkRect dst = SkRect::Make(layer->bound()); |
SkBitmap bm; |
wrap_texture(layer->texture(), |
@@ -28,22 +30,10 @@ |
!layer->isAtlased() ? layer->rect().height() : layer->texture()->height(), |
&bm); |
- 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->drawBitmapRectToRect(bm, &src, dst, layer->paint()); |
- canvas->restore(); |
- } else { |
- canvas->drawSprite(bm, |
- layer->srcIR().fLeft + layer->offset().fX, |
- layer->srcIR().fTop + layer->offset().fY, |
- layer->paint()); |
- } |
+ canvas->save(); |
+ canvas->setMatrix(SkMatrix::I()); |
+ canvas->drawBitmapRectToRect(bm, &src, dst, layer->paint()); |
+ canvas->restore(); |
} |
// Used by GrRecordReplaceDraw. It intercepts nested drawPicture calls and |