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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 SkBitmap fBitmap; | 230 SkBitmap fBitmap; |
231 SkRect fSrc; | 231 SkRect fSrc; |
232 SkRect fDst; | 232 SkRect fDst; |
233 SkPaint fPaint; | 233 SkPaint fPaint; |
234 SkPaint* fPaintPtr; | 234 SkPaint* fPaintPtr; |
235 SkCanvas::DrawBitmapRectFlags fFlags; | 235 SkCanvas::DrawBitmapRectFlags fFlags; |
236 | 236 |
237 typedef SkDrawCommand INHERITED; | 237 typedef SkDrawCommand INHERITED; |
238 }; | 238 }; |
239 | 239 |
240 class SkDrawDataCommand : public SkDrawCommand { | |
241 public: | |
242 SkDrawDataCommand(const void* data, size_t length); | |
243 virtual ~SkDrawDataCommand() { delete [] fData; } | |
244 virtual void execute(SkCanvas* canvas) const SK_OVERRIDE; | |
245 private: | |
246 char* fData; | |
247 size_t fLength; | |
248 | |
249 typedef SkDrawCommand INHERITED; | |
250 }; | |
251 | |
252 class SkBeginCommentGroupCommand : public SkDrawCommand { | 240 class SkBeginCommentGroupCommand : public SkDrawCommand { |
253 public: | 241 public: |
254 SkBeginCommentGroupCommand(const char* description); | 242 SkBeginCommentGroupCommand(const char* description); |
255 virtual void execute(SkCanvas* canvas) const SK_OVERRIDE { | 243 virtual void execute(SkCanvas* canvas) const SK_OVERRIDE { |
256 canvas->beginCommentGroup(fDescription.c_str()); | 244 canvas->beginCommentGroup(fDescription.c_str()); |
257 }; | 245 }; |
258 private: | 246 private: |
259 SkString fDescription; | 247 SkString fDescription; |
260 | 248 |
261 typedef SkDrawCommand INHERITED; | 249 typedef SkDrawCommand INHERITED; |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 SkScalar y() const { return fDy; } | 588 SkScalar y() const { return fDy; } |
601 | 589 |
602 private: | 590 private: |
603 SkScalar fDx; | 591 SkScalar fDx; |
604 SkScalar fDy; | 592 SkScalar fDy; |
605 | 593 |
606 typedef SkDrawCommand INHERITED; | 594 typedef SkDrawCommand INHERITED; |
607 }; | 595 }; |
608 | 596 |
609 #endif | 597 #endif |
OLD | NEW |