aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImagePriv.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-30 21:03:46 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-30 21:03:46 +0000
commit9ea5a3bc7361cb88d37280b5922fba9430fed328 (patch)
treea16d1193b8b30ad47cfd578207335b5837765060 /src/image/SkImagePriv.cpp
parent97efada074e4806479f1350ab1508939c2fdcb53 (diff)
change SkSurface::newCanvas() to getCanvas(), and redefine its life-cycle to be
a single canvas for the lifetime of the surface. Get a playback copy from the src picture, so we can continue to record into the original picture. git-svn-id: http://skia.googlecode.com/svn/trunk@4842 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/image/SkImagePriv.cpp')
-rw-r--r--src/image/SkImagePriv.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/image/SkImagePriv.cpp b/src/image/SkImagePriv.cpp
index a826e80f9a..67d31b746a 100644
--- a/src/image/SkImagePriv.cpp
+++ b/src/image/SkImagePriv.cpp
@@ -133,8 +133,10 @@ void SkImagePrivDrawPicture(SkCanvas* canvas, SkPicture* picture,
x + SkIntToScalar(picture->width()),
y + SkIntToScalar(picture->height()));
canvas->saveLayer(&bounds, paint);
+ canvas->translate(x, y);
} else if (x || y) {
canvas->save();
+ canvas->translate(x, y);
}
canvas->drawPicture(*picture);