aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2015-07-17 05:57:34 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-17 05:57:34 -0700
commit91110195a2eee170c11885da9d16f94b00a39f87 (patch)
tree4dc22ce2b05e9cde0369d2f4d97bb18cd8d2f6aa /samplecode
parentac66a8122b27c388cc74b3913d9a9be351a44e54 (diff)
Revert of guard to remove DrawBitmapRectFlags (patchset #1 id:1 of https://codereview.chromium.org/1235393003/)
Reason for revert: breaking android framework build Original issue's description: > guard to remove DrawBitmapRectFlags > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/6fb0b6779e40ce05c20cf279f0ecff31fa3cd60d TBR=fmalita@chromium.org,djsollen@google.com,reed@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1230823007
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleApp.cpp2
-rw-r--r--samplecode/SampleBitmapRect.cpp4
-rw-r--r--samplecode/SampleTextureDomain.cpp7
3 files changed, 7 insertions, 6 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 508ff63052..a80ccd95b8 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -1116,7 +1116,7 @@ void SampleWindow::showZoomer(SkCanvas* canvas) {
// Clear the background behind our zoomed in view
paint.setColor(SK_ColorWHITE);
canvas->drawRect(dest, paint);
- canvas->drawBitmapRect(bitmap, src, dest, NULL);
+ canvas->drawBitmapRect(bitmap, &src, dest);
paint.setColor(SK_ColorBLACK);
paint.setStyle(SkPaint::kStroke_Style);
// Draw a border around the pixel in the middle
diff --git a/samplecode/SampleBitmapRect.cpp b/samplecode/SampleBitmapRect.cpp
index b6e629c9f7..123bfb8b12 100644
--- a/samplecode/SampleBitmapRect.cpp
+++ b/samplecode/SampleBitmapRect.cpp
@@ -131,7 +131,7 @@ protected:
for (int i = 0; i < 2; ++i) {
paint.setFilterQuality(1 == i ? kLow_SkFilterQuality : kNone_SkFilterQuality);
- canvas->drawBitmapRect(bitmap, &srcR, fDstR[i], &paint);
+ canvas->drawBitmapRectToRect(bitmap, &srcR, fDstR[i], &paint);
canvas->drawRect(fDstR[i], paint);
}
}
@@ -225,7 +225,7 @@ protected:
for (int i = 0; i < 2; ++i) {
paint.setFilterQuality(1 == i ? kLow_SkFilterQuality : kNone_SkFilterQuality);
- canvas->drawBitmapRect(fBitmap, &fSrcR, fDstR[i], &paint);
+ canvas->drawBitmapRectToRect(fBitmap, &fSrcR, fDstR[i], &paint);
canvas->drawRect(fDstR[i], paint);
}
}
diff --git a/samplecode/SampleTextureDomain.cpp b/samplecode/SampleTextureDomain.cpp
index c798f42922..2794a06956 100644
--- a/samplecode/SampleTextureDomain.cpp
+++ b/samplecode/SampleTextureDomain.cpp
@@ -53,7 +53,7 @@ protected:
// the constrained texture domain.
srcRect.setXYWH(1, 1, 3, 3);
dstRect.setXYWH(5, 5, 305, 305);
- canvas->drawBitmapRect(fBM, &srcRect, dstRect, &paint);
+ canvas->drawBitmapRectToRect(fBM, &srcRect, dstRect, &paint);
// Test that bitmap draws across separate devices also respect
// the constrainted texture domain.
@@ -64,7 +64,8 @@ protected:
srcRect.setXYWH(1, 1, 3, 3);
dstRect.setXYWH(1, 1, 3, 3);
- surface->getCanvas()->drawBitmapRect(fBM, &srcRect, dstRect, &paint);
+ surface->getCanvas()->drawBitmapRectToRect(fBM, &srcRect, dstRect,
+ &paint);
SkAutoTUnref<SkImage> image(surface->newImageSnapshot());
@@ -97,7 +98,7 @@ protected:
dstRect.setXYWH(-150, -150, 300, 300);
canvas->translate(550, 550);
canvas->rotate(45);
- canvas->drawBitmapRect(fBM, dstRect, &paint);
+ canvas->drawBitmapRectToRect(fBM, NULL, dstRect, &paint);
}
private:
typedef SkView INHERITED;