| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |