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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.cpp ('k') | src/utils/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef SKDRAWCOMMAND_H_ 9 #ifndef SKDRAWCOMMAND_H_
10 #define SKDRAWCOMMAND_H_ 10 #define SKDRAWCOMMAND_H_
(...skipping 23 matching lines...) Expand all
34 kDrawImageRect_OpType, 34 kDrawImageRect_OpType,
35 kDrawOval_OpType, 35 kDrawOval_OpType,
36 kDrawPaint_OpType, 36 kDrawPaint_OpType,
37 kDrawPatch_OpType, 37 kDrawPatch_OpType,
38 kDrawPath_OpType, 38 kDrawPath_OpType,
39 kDrawPoints_OpType, 39 kDrawPoints_OpType,
40 kDrawPosText_OpType, 40 kDrawPosText_OpType,
41 kDrawPosTextH_OpType, 41 kDrawPosTextH_OpType,
42 kDrawRect_OpType, 42 kDrawRect_OpType,
43 kDrawRRect_OpType, 43 kDrawRRect_OpType,
44 kDrawSprite_OpType,
44 kDrawText_OpType, 45 kDrawText_OpType,
45 kDrawTextBlob_OpType, 46 kDrawTextBlob_OpType,
46 kDrawTextOnPath_OpType, 47 kDrawTextOnPath_OpType,
47 kDrawVertices_OpType, 48 kDrawVertices_OpType,
48 kEndDrawPicture_OpType, 49 kEndDrawPicture_OpType,
49 kRestore_OpType, 50 kRestore_OpType,
50 kSave_OpType, 51 kSave_OpType,
51 kSaveLayer_OpType, 52 kSaveLayer_OpType,
52 kSetMatrix_OpType, 53 kSetMatrix_OpType,
53 54
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 void execute(SkCanvas* canvas) const override; 511 void execute(SkCanvas* canvas) const override;
511 bool render(SkCanvas* canvas) const override; 512 bool render(SkCanvas* canvas) const override;
512 private: 513 private:
513 SkRRect fOuter; 514 SkRRect fOuter;
514 SkRRect fInner; 515 SkRRect fInner;
515 SkPaint fPaint; 516 SkPaint fPaint;
516 517
517 typedef SkDrawCommand INHERITED; 518 typedef SkDrawCommand INHERITED;
518 }; 519 };
519 520
521 class SkDrawSpriteCommand : public SkDrawCommand {
522 public:
523 SkDrawSpriteCommand(const SkBitmap& bitmap, int left, int top, const SkPaint * paint);
524 void execute(SkCanvas* canvas) const override;
525 bool render(SkCanvas* canvas) const override;
526 private:
527 SkBitmap fBitmap;
528 int fLeft;
529 int fTop;
530 SkPaint fPaint;
531 SkPaint* fPaintPtr;
532
533 typedef SkDrawCommand INHERITED;
534 };
535
520 class SkDrawVerticesCommand : public SkDrawCommand { 536 class SkDrawVerticesCommand : public SkDrawCommand {
521 public: 537 public:
522 SkDrawVerticesCommand(SkCanvas::VertexMode vmode, int vertexCount, 538 SkDrawVerticesCommand(SkCanvas::VertexMode vmode, int vertexCount,
523 const SkPoint vertices[], const SkPoint texs[], 539 const SkPoint vertices[], const SkPoint texs[],
524 const SkColor colors[], SkXfermode* xfermode, 540 const SkColor colors[], SkXfermode* xfermode,
525 const uint16_t indices[], int indexCount, 541 const uint16_t indices[], int indexCount,
526 const SkPaint& paint); 542 const SkPaint& paint);
527 virtual ~SkDrawVerticesCommand(); 543 virtual ~SkDrawVerticesCommand();
528 void execute(SkCanvas* canvas) const override; 544 void execute(SkCanvas* canvas) const override;
529 private: 545 private:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 void setUserMatrix(const SkMatrix&) override; 594 void setUserMatrix(const SkMatrix&) override;
579 void execute(SkCanvas* canvas) const override; 595 void execute(SkCanvas* canvas) const override;
580 private: 596 private:
581 SkMatrix fUserMatrix; 597 SkMatrix fUserMatrix;
582 SkMatrix fMatrix; 598 SkMatrix fMatrix;
583 599
584 typedef SkDrawCommand INHERITED; 600 typedef SkDrawCommand INHERITED;
585 }; 601 };
586 602
587 #endif 603 #endif
OLDNEW
« 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