| 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_ |
| 11 | 11 |
| 12 #include "SkPictureFlat.h" | 12 #include "SkPictureFlat.h" |
| 13 #include "SkCanvas.h" | 13 #include "SkCanvas.h" |
| 14 #include "SkString.h" | 14 #include "SkString.h" |
| 15 | 15 |
| 16 class SK_API SkDrawCommand { | 16 class SK_API SkDrawCommand { |
| 17 public: | 17 public: |
| 18 // Staging for Chromium |
| 19 typedef DrawType OpType; |
| 20 |
| 21 static const int kOpTypeCount = LAST_DRAWTYPE_ENUM+1; |
| 22 |
| 23 static const char* kDrawRectString; |
| 24 static const char* kClipRectString; |
| 25 |
| 26 static const OpType kSave_OpType; |
| 27 static const OpType kClipRect_OpType; |
| 28 static const OpType kDrawRect_OpType; |
| 29 static const OpType kRestore_OpType; |
| 30 static const OpType kSetMatrix_OpType; |
| 31 // End Staging |
| 32 |
| 33 |
| 18 SkDrawCommand(DrawType drawType); | 34 SkDrawCommand(DrawType drawType); |
| 19 | 35 |
| 20 virtual ~SkDrawCommand(); | 36 virtual ~SkDrawCommand(); |
| 21 | 37 |
| 22 virtual SkString toString() const; | 38 virtual SkString toString() const; |
| 23 | 39 |
| 24 void setOffset(size_t offset) { fOffset = offset; } | 40 void setOffset(size_t offset) { fOffset = offset; } |
| 25 size_t offset() const { return fOffset; } | 41 size_t offset() const { return fOffset; } |
| 26 | 42 |
| 27 virtual const char* toCString() const { | 43 virtual const char* toCString() const { |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 SkScalar y() const { return fDy; } | 597 SkScalar y() const { return fDy; } |
| 582 | 598 |
| 583 private: | 599 private: |
| 584 SkScalar fDx; | 600 SkScalar fDx; |
| 585 SkScalar fDy; | 601 SkScalar fDy; |
| 586 | 602 |
| 587 typedef SkDrawCommand INHERITED; | 603 typedef SkDrawCommand INHERITED; |
| 588 }; | 604 }; |
| 589 | 605 |
| 590 #endif | 606 #endif |
| OLD | NEW |