aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPicture.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-18 12:59:44 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-18 12:59:44 +0000
commitf1ab723033a186dc53434104a636c2dfac5fc863 (patch)
treeb3e9f1224fdaa890072b22a953df589fdb80fd58 /src/core/SkPicture.cpp
parent54339a826e460c2371f946224cca4db8482d8f5b (diff)
Change drawBitmapRect to take a float-src-rect instead of integer-src-rect. This
allows the client more control over the scaling. Because of virtual overrides and wanting to keep the old call-sites up and running, this CL renames the virtual entry-point to drawBitmapRectToRect, and downgrades drawBitmapRect to a non-virtual helper function. The implementation is to use the float-rect for computing the matrix, but still cons-up an integer rect for the purposes of subsetting the original bitmap. We do this by calling float_src->roundOut(&int_src) so that we include all (partially) covered src pixels. No change needed on SkDevice, since that signature is explicitly passed the computed matrix. Review URL: https://codereview.appspot.com/6501140 git-svn-id: http://skia.googlecode.com/svn/trunk@5578 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPicture.cpp')
-rw-r--r--src/core/SkPicture.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 4c7ccf7c0f..7e8b371b58 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -240,7 +240,8 @@ void SkPicture::draw(SkCanvas* surface) {
// V4 : move SkPictInfo to be the header
// V5 : don't read/write FunctionPtr on cross-process (we can detect that)
// V6 : added serialization of SkPath's bounds (and packed its flags tighter)
-#define PICTURE_VERSION 6
+// V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect)
+#define PICTURE_VERSION 7
SkPicture::SkPicture(SkStream* stream, bool* success) : SkRefCnt() {
if (success) {