Chromium Code Reviews| Index: src/image/SkImagePriv.cpp |
| diff --git a/src/image/SkImagePriv.cpp b/src/image/SkImagePriv.cpp |
| index c44e439b72c8b29eb82837b6dae19797d4b9569b..1f9778550584400757fb4050769d5cf36c9ab67a 100644 |
| --- a/src/image/SkImagePriv.cpp |
| +++ b/src/image/SkImagePriv.cpp |
| @@ -141,3 +141,15 @@ void SkImagePrivDrawPicture(SkCanvas* canvas, SkPicture* picture, |
| canvas->drawPicture(*picture); |
| canvas->restoreToCount(saveCount); |
| } |
| + |
| +void SkImagePrivDrawPicture(SkCanvas* canvas, SkPicture* picture, |
|
Justin Novosad
2013/07/18 21:54:37
You need to write a good test for this function.
|
| + SkRect src, SkRect dst, const SkPaint* paint) { |
| + int saveCount = canvas->getSaveCount(); |
|
Justin Novosad
2013/07/18 21:54:37
No need for this call. This value is returned by s
|
| + |
| + canvas->clipRect(src); |
|
Justin Novosad
2013/07/18 21:54:37
Bug: This clip does not get undone. Also I think
|
| + canvas->saveLayer(&dst, paint); |
|
reed1
2013/07/19 14:03:45
Why saveLayer instead of just save?
|
| + canvas->translate(dst.x(), dst.y()); |
|
Justin Novosad
2013/07/18 21:54:37
This is not the right transform to map src to dst.
reed1
2013/07/19 14:03:45
SkMatrix has a mapRectToRect helper function you c
|
| + |
| + canvas->drawPicture(*picture); |
| + canvas->restoreToCount(saveCount); |
| +} |