diff options
author | robertphillips <robertphillips@google.com> | 2015-11-03 04:35:58 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-03 04:35:58 -0800 |
commit | 21b766347064837e6b78d600755901aad88cd6e0 (patch) | |
tree | c8cd96ff1f18871c386d9508c84afc379f1172a3 /samplecode | |
parent | 7600183ba7d8c8df6fbba1b32a73e6394216754e (diff) |
Revert of stop using drawSprite (at least w/ no filters) as it is going away (patchset #2 id:20001 of https://codereview.chromium.org/1411173010/ )
Reason for revert:
Breaking the bots
Original issue's description:
> stop using drawSprite (at least w/ no filters) as it is going away
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4a21602982d411bb764e46dc47e009b12bd5cb39
TBR=senorblanco@google.com,senorblanco@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1413363011
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleAll.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp index b5a0fe568d..628504d90d 100644 --- a/samplecode/SampleAll.cpp +++ b/samplecode/SampleAll.cpp @@ -440,10 +440,14 @@ protected: canvas->drawPath(path, paint); paint.setShader(nullptr); - // bitmap + // bitmap, sprite canvas->translate(SkIntToScalar(50), 0); paint.setStyle(SkPaint::kFill_Style); canvas->drawBitmap(fBug, left, top, &paint); + canvas->translate(SkIntToScalar(30), 0); + canvas->drawSprite(fTb, + SkScalarRoundToInt(canvas->getTotalMatrix().getTranslateX()), + spriteOffset + 10, &paint); canvas->translate(-SkIntToScalar(30), SkIntToScalar(30)); paint.setShader(shaderTest())->unref(); // test compose shader |