Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(818)

Unified Diff: src/utils/debugger/SkDrawCommand.h

Issue 1529803004: Revert of remove drawSprite from canvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.cpp ('k') | src/utils/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/debugger/SkDrawCommand.h
diff --git a/src/utils/debugger/SkDrawCommand.h b/src/utils/debugger/SkDrawCommand.h
index 9da05eeedb94542197236fea32d82bc0a6f8b0e9..c7e5f008a423b4e4c1911bdc72dbd461292c7060 100644
--- a/src/utils/debugger/SkDrawCommand.h
+++ b/src/utils/debugger/SkDrawCommand.h
@@ -41,6 +41,7 @@
kDrawPosTextH_OpType,
kDrawRect_OpType,
kDrawRRect_OpType,
+ kDrawSprite_OpType,
kDrawText_OpType,
kDrawTextBlob_OpType,
kDrawTextOnPath_OpType,
@@ -517,6 +518,21 @@
typedef SkDrawCommand INHERITED;
};
+class SkDrawSpriteCommand : public SkDrawCommand {
+public:
+ SkDrawSpriteCommand(const SkBitmap& bitmap, int left, int top, const SkPaint* paint);
+ void execute(SkCanvas* canvas) const override;
+ bool render(SkCanvas* canvas) const override;
+private:
+ SkBitmap fBitmap;
+ int fLeft;
+ int fTop;
+ SkPaint fPaint;
+ SkPaint* fPaintPtr;
+
+ typedef SkDrawCommand INHERITED;
+};
+
class SkDrawVerticesCommand : public SkDrawCommand {
public:
SkDrawVerticesCommand(SkCanvas::VertexMode vmode, int vertexCount,
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.cpp ('k') | src/utils/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698