| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkRecordDraw_DEFINED | 8 #ifndef SkRecordDraw_DEFINED |
| 9 #define SkRecordDraw_DEFINED | 9 #define SkRecordDraw_DEFINED |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 SkPicture const* const drawablePicts[], int drawableCou
nt, | 38 SkPicture const* const drawablePicts[], int drawableCou
nt, |
| 39 int start, int stop, const SkMatrix& initialCTM); | 39 int start, int stop, const SkMatrix& initialCTM); |
| 40 | 40 |
| 41 namespace SkRecords { | 41 namespace SkRecords { |
| 42 | 42 |
| 43 // This is an SkRecord visitor that will draw that SkRecord to an SkCanvas. | 43 // This is an SkRecord visitor that will draw that SkRecord to an SkCanvas. |
| 44 class Draw : SkNoncopyable { | 44 class Draw : SkNoncopyable { |
| 45 public: | 45 public: |
| 46 explicit Draw(SkCanvas* canvas, SkPicture const* const drawablePicts[], | 46 explicit Draw(SkCanvas* canvas, SkPicture const* const drawablePicts[], |
| 47 SkDrawable* const drawables[], int drawableCount, | 47 SkDrawable* const drawables[], int drawableCount, |
| 48 const SkMatrix* initialCTM = NULL) | 48 const SkMatrix* initialCTM = nullptr) |
| 49 : fInitialCTM(initialCTM ? *initialCTM : canvas->getTotalMatrix()) | 49 : fInitialCTM(initialCTM ? *initialCTM : canvas->getTotalMatrix()) |
| 50 , fCanvas(canvas) | 50 , fCanvas(canvas) |
| 51 , fDrawablePicts(drawablePicts) | 51 , fDrawablePicts(drawablePicts) |
| 52 , fDrawables(drawables) | 52 , fDrawables(drawables) |
| 53 , fDrawableCount(drawableCount) | 53 , fDrawableCount(drawableCount) |
| 54 {} | 54 {} |
| 55 | 55 |
| 56 // This operator calls methods on the |canvas|. The various draw() wrapper | 56 // This operator calls methods on the |canvas|. The various draw() wrapper |
| 57 // methods around SkCanvas are defined by the DRAW() macro in | 57 // methods around SkCanvas are defined by the DRAW() macro in |
| 58 // SkRecordDraw.cpp. | 58 // SkRecordDraw.cpp. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 71 const SkMatrix fInitialCTM; | 71 const SkMatrix fInitialCTM; |
| 72 SkCanvas* fCanvas; | 72 SkCanvas* fCanvas; |
| 73 SkPicture const* const* fDrawablePicts; | 73 SkPicture const* const* fDrawablePicts; |
| 74 SkDrawable* const* fDrawables; | 74 SkDrawable* const* fDrawables; |
| 75 int fDrawableCount; | 75 int fDrawableCount; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace SkRecords | 78 } // namespace SkRecords |
| 79 | 79 |
| 80 #endif//SkRecordDraw_DEFINED | 80 #endif//SkRecordDraw_DEFINED |
| OLD | NEW |