| Index: src/gpu/GrRecordReplaceDraw.cpp
|
| diff --git a/src/gpu/GrRecordReplaceDraw.cpp b/src/gpu/GrRecordReplaceDraw.cpp
|
| index b53f003904df3854a8eea59554108fd315e16209..f0abd6481e70535e86d31c0ce18214f3f694b4c1 100644
|
| --- a/src/gpu/GrRecordReplaceDraw.cpp
|
| +++ b/src/gpu/GrRecordReplaceDraw.cpp
|
| @@ -51,18 +51,13 @@
|
| }
|
|
|
| static inline void draw_replacement_bitmap(const GrReplacements::ReplacementInfo* ri,
|
| - SkCanvas* canvas,
|
| - const SkMatrix& initialMatrix) {
|
| + SkCanvas* canvas) {
|
| SkRect src = SkRect::Make(ri->fSrcRect);
|
| SkRect dst = SkRect::MakeXYWH(SkIntToScalar(ri->fPos.fX),
|
| SkIntToScalar(ri->fPos.fY),
|
| SkIntToScalar(ri->fSrcRect.width()),
|
| SkIntToScalar(ri->fSrcRect.height()));
|
| -
|
| - canvas->save();
|
| - canvas->setMatrix(initialMatrix);
|
| ri->fImage->draw(canvas, &src, dst, ri->fPaint);
|
| - canvas->restore();
|
| }
|
|
|
| void GrRecordReplaceDraw(const SkRecord& record,
|
| @@ -75,8 +70,6 @@
|
| SkRecords::Draw draw(canvas);
|
| const GrReplacements::ReplacementInfo* ri = NULL;
|
| int searchStart = 0;
|
| -
|
| - const SkMatrix initialMatrix = canvas->getTotalMatrix();
|
|
|
| if (bbh) {
|
| // Draw only ops that affect pixels in the canvas's current clip.
|
| @@ -96,7 +89,7 @@
|
| }
|
| ri = replacements->lookupByStart((uintptr_t)ops[i], &searchStart);
|
| if (ri) {
|
| - draw_replacement_bitmap(ri, canvas, initialMatrix);
|
| + draw_replacement_bitmap(ri, canvas);
|
|
|
| while ((uintptr_t)ops[i] < ri->fStop) {
|
| ++i;
|
| @@ -114,7 +107,8 @@
|
| }
|
| ri = replacements->lookupByStart(i, &searchStart);
|
| if (ri) {
|
| - draw_replacement_bitmap(ri, canvas, initialMatrix);
|
| + draw_replacement_bitmap(ri, canvas);
|
| +
|
| i = ri->fStop;
|
| continue;
|
| }
|
|
|