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

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

Issue 1534443003: remove drawSprite from canvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: really tired of unused variable warnings 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
Index: src/utils/debugger/SkDrawCommand.cpp
diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp
index 330c2c9183cecf156a995c0b0b4d2feddeeb8190..9ebb81e74ae63d94c97a809b613173398c8c101c 100644
--- a/src/utils/debugger/SkDrawCommand.cpp
+++ b/src/utils/debugger/SkDrawCommand.cpp
@@ -48,7 +48,6 @@ const char* SkDrawCommand::GetCommandString(OpType type) {
case kDrawPosTextH_OpType: return "DrawPosTextH";
case kDrawRect_OpType: return "DrawRect";
case kDrawRRect_OpType: return "DrawRRect";
- case kDrawSprite_OpType: return "DrawSprite";
case kDrawText_OpType: return "DrawText";
case kDrawTextBlob_OpType: return "DrawTextBlob";
case kDrawTextOnPath_OpType: return "DrawTextOnPath";
@@ -799,36 +798,6 @@ bool SkDrawDRRectCommand::render(SkCanvas* canvas) const {
return true;
}
-SkDrawSpriteCommand::SkDrawSpriteCommand(const SkBitmap& bitmap, int left, int top,
- const SkPaint* paint)
- : INHERITED(kDrawSprite_OpType) {
- fBitmap = bitmap;
- fLeft = left;
- fTop = top;
- if (paint) {
- fPaint = *paint;
- fPaintPtr = &fPaint;
- } else {
- fPaintPtr = nullptr;
- }
-
- fInfo.push(SkObjectParser::BitmapToString(bitmap));
- fInfo.push(SkObjectParser::IntToString(left, "Left: "));
- fInfo.push(SkObjectParser::IntToString(top, "Top: "));
- if (paint) {
- fInfo.push(SkObjectParser::PaintToString(*paint));
- }
-}
-
-void SkDrawSpriteCommand::execute(SkCanvas* canvas) const {
- canvas->drawSprite(fBitmap, fLeft, fTop, fPaintPtr);
-}
-
-bool SkDrawSpriteCommand::render(SkCanvas* canvas) const {
- render_bitmap(canvas, fBitmap);
- return true;
-}
-
SkDrawTextCommand::SkDrawTextCommand(const void* text, size_t byteLength, SkScalar x, SkScalar y,
const SkPaint& paint)
: INHERITED(kDrawText_OpType) {

Powered by Google App Engine
This is Rietveld 408576698