diff options
author | reed <reed@google.com> | 2015-11-03 11:27:07 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-03 11:27:07 -0800 |
commit | 67b8b5e67a427382fed8c5d8b3c70a21ed2492c6 (patch) | |
tree | 3000bc4503b587abf98253178e38fcad5ed4eb27 /samplecode/SampleAll.cpp | |
parent | 4a40a46c654f292b9407fe42012831855411f75e (diff) |
Revert of Revert[2] of "stop using drawSprite (at least w/ no filters) as it is going away" (patchset #1 id:1 of https://codereview.chromium.org/1410343011/ )
Reason for revert:
failing on msaa
Original issue's description:
> Revert[2] of "stop using drawSprite (at least w/ no filters) as it is going away"
>
> Fixed assert in test that was calling GrRecordReplaceDraw(). That function now uses
> drawBitmap, so updated the test to check for that (instead of drawSprite).
>
> This reverts commit 21b766347064837e6b78d600755901aad88cd6e0.
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/7b81994d95f10cda80ddb85af68a2651ff31782f
TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1420053009
Diffstat (limited to 'samplecode/SampleAll.cpp')
-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 |