| 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 | 521 |
| 522 typedef SkDrawCommand INHERITED; | 522 typedef SkDrawCommand INHERITED; |
| 523 }; | 523 }; |
| 524 | 524 |
| 525 class SkDrawPatchCommand : public SkDrawCommand { | 525 class SkDrawPatchCommand : public SkDrawCommand { |
| 526 public: | 526 public: |
| 527 SkDrawPatchCommand(const SkPoint cubics[12], const SkColor colors[4], | 527 SkDrawPatchCommand(const SkPoint cubics[12], const SkColor colors[4], |
| 528 const SkPoint texCoords[4], SkXfermode* xmode, | 528 const SkPoint texCoords[4], SkXfermode* xmode, |
| 529 const SkPaint& paint); | 529 const SkPaint& paint); |
| 530 void execute(SkCanvas* canvas) const override; | 530 void execute(SkCanvas* canvas) const override; |
| 531 Json::Value toJSON() const override; |
| 532 static SkDrawPatchCommand* fromJSON(Json::Value& command); |
| 531 | 533 |
| 532 private: | 534 private: |
| 533 SkPoint fCubics[12]; | 535 SkPoint fCubics[12]; |
| 534 SkColor fColors[4]; | 536 SkColor* fColorsPtr; |
| 535 SkPoint fTexCoords[4]; | 537 SkColor fColors[4]; |
| 538 SkPoint* fTexCoordsPtr; |
| 539 SkPoint fTexCoords[4]; |
| 536 SkAutoTUnref<SkXfermode> fXfermode; | 540 SkAutoTUnref<SkXfermode> fXfermode; |
| 537 SkPaint fPaint; | 541 SkPaint fPaint; |
| 538 | 542 |
| 539 typedef SkDrawCommand INHERITED; | 543 typedef SkDrawCommand INHERITED; |
| 540 }; | 544 }; |
| 541 | 545 |
| 542 | 546 |
| 543 class SkDrawRectCommand : public SkDrawCommand { | 547 class SkDrawRectCommand : public SkDrawCommand { |
| 544 public: | 548 public: |
| 545 SkDrawRectCommand(const SkRect& rect, const SkPaint& paint); | 549 SkDrawRectCommand(const SkRect& rect, const SkPaint& paint); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 static SkSetMatrixCommand* fromJSON(Json::Value& command); | 662 static SkSetMatrixCommand* fromJSON(Json::Value& command); |
| 659 | 663 |
| 660 private: | 664 private: |
| 661 SkMatrix fUserMatrix; | 665 SkMatrix fUserMatrix; |
| 662 SkMatrix fMatrix; | 666 SkMatrix fMatrix; |
| 663 | 667 |
| 664 typedef SkDrawCommand INHERITED; | 668 typedef SkDrawCommand INHERITED; |
| 665 }; | 669 }; |
| 666 | 670 |
| 667 #endif | 671 #endif |
| OLD | NEW |