diff options
author | piotaixr <piotaixr@chromium.org> | 2014-09-24 13:03:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-24 13:03:30 -0700 |
commit | b5fae93d72c7b6480f83fd8a7b534cd1fdfcd49a (patch) | |
tree | f3309c76ff9564edcbff3a8da44f2f3c817d97b9 /samplecode/SampleTextureDomain.cpp | |
parent | 0f7197bc0ddbe6c61732d6fe69df86bdba00a060 (diff) |
SkCanvas::drawImage is the new way for drawing a SkImage to a Canvas
BUG=skia:2947
Committed: https://skia.googlesource.com/skia/+/432789972c1e1f8a66165c75a250dba1853efa08
R=junov@chromium.org, reed@google.com, bsalomon@google.com
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/583453002
Diffstat (limited to 'samplecode/SampleTextureDomain.cpp')
-rw-r--r-- | samplecode/SampleTextureDomain.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/samplecode/SampleTextureDomain.cpp b/samplecode/SampleTextureDomain.cpp index 926c5596b0..af511c7b03 100644 --- a/samplecode/SampleTextureDomain.cpp +++ b/samplecode/SampleTextureDomain.cpp @@ -71,7 +71,7 @@ protected: srcRect.setXYWH(1, 1, 3, 3); dstRect.setXYWH(405, 5, 305, 305); - image->draw(canvas, &srcRect, dstRect, &paint); + canvas->drawImageRect(image, &srcRect, dstRect, &paint); // Test that bitmap blurring using a subrect // renders correctly @@ -83,7 +83,7 @@ protected: SkBlurMaskFilter::kHighQuality_BlurFlag | SkBlurMaskFilter::kIgnoreTransform_BlurFlag); paint.setMaskFilter(mf)->unref(); - image->draw(canvas, &srcRect, dstRect, &paint); + canvas->drawImageRect(image, &srcRect, dstRect, &paint); // Blur and a rotation + NULL src rect // This should not trigger the texture domain code |