diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkPicturePlayback.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp index bcad6162c0..cf3484b028 100644 --- a/src/core/SkPicturePlayback.cpp +++ b/src/core/SkPicturePlayback.cpp @@ -561,6 +561,9 @@ void SkPicturePlayback::draw(SkCanvas& canvas) { SkReader32 reader(fOpData->bytes(), fOpData->size()); TextContainer text; + // Record this, so we can concat w/ it if we encounter a setMatrix() + SkMatrix initialMatrix = canvas.getTotalMatrix(); + while (!reader.eof()) { switch (reader.readInt()) { case CLIP_PATH: { @@ -786,9 +789,11 @@ void SkPicturePlayback::draw(SkCanvas& canvas) { SkScalar sy = reader.readScalar(); canvas.scale(sx, sy); } break; - case SET_MATRIX: - canvas.setMatrix(*getMatrix(reader)); - break; + case SET_MATRIX: { + SkMatrix matrix; + matrix.setConcat(initialMatrix, *getMatrix(reader)); + canvas.setMatrix(matrix); + } break; case SKEW: { SkScalar sx = reader.readScalar(); SkScalar sy = reader.readScalar(); |