Index: src/pipe/SkGPipeRead.cpp |
diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp |
index 24f3e2d1eabe933083f023341716a4e255c41aee..4d57a6cca9db0896249b825ff03af0bb70f2418f 100644 |
--- a/src/pipe/SkGPipeRead.cpp |
+++ b/src/pipe/SkGPipeRead.cpp |
@@ -654,6 +654,17 @@ |
} |
} |
+static void drawSprite_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, |
+ SkGPipeState* state) { |
+ BitmapHolder holder(reader, op32, state); |
+ bool hasPaint = SkToBool(DrawOp_unpackFlags(op32) & kDrawBitmap_HasPaint_DrawOpFlag); |
+ const SkIPoint* point = skip<SkIPoint>(reader); |
+ const SkBitmap* bitmap = holder.getBitmap(); |
+ if (state->shouldDraw()) { |
+ canvas->drawSprite(*bitmap, point->fX, point->fY, hasPaint ? &state->paint() : nullptr); |
+ } |
+} |
+ |
static void drawImage_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, SkGPipeState* state) { |
unsigned slot = DrawOp_unpackData(op32); |
unsigned flags = DrawOp_unpackFlags(op32); |
@@ -880,6 +891,7 @@ |
drawPosTextH_rp, |
drawRect_rp, |
drawRRect_rp, |
+ drawSprite_rp, |
drawText_rp, |
drawTextBlob_rp, |
drawTextOnPath_rp, |