| 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 |
| 11 #include "SkBBoxHierarchy.h" | 11 #include "SkBBoxHierarchy.h" |
| 12 #include "SkCanvas.h" | 12 #include "SkCanvas.h" |
| 13 #include "SkDrawPictureCallback.h" | 13 #include "SkDrawPictureCallback.h" |
| 14 #include "SkMatrix.h" | 14 #include "SkMatrix.h" |
| 15 #include "SkRecord.h" | 15 #include "SkRecord.h" |
| 16 | 16 |
| 17 class SkLayerInfo; |
| 18 |
| 17 // Fill a BBH to be used by SkRecordDraw to accelerate playback. | 19 // Fill a BBH to be used by SkRecordDraw to accelerate playback. |
| 18 void SkRecordFillBounds(const SkRect& cullRect, const SkRecord&, SkBBoxHierarchy
*); | 20 void SkRecordFillBounds(const SkRect& cullRect, const SkRecord&, SkBBoxHierarchy
*); |
| 19 | 21 |
| 20 #if SK_SUPPORT_GPU | |
| 21 class GrAccelData; | |
| 22 | |
| 23 void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord& record, | 22 void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord& record, |
| 24 SkBBoxHierarchy* bbh, GrAccelData* data); | 23 SkBBoxHierarchy* bbh, SkLayerInfo* data); |
| 25 #endif | |
| 26 | 24 |
| 27 // Draw an SkRecord into an SkCanvas. A convenience wrapper around SkRecords::D
raw. | 25 // Draw an SkRecord into an SkCanvas. A convenience wrapper around SkRecords::D
raw. |
| 28 void SkRecordDraw(const SkRecord&, SkCanvas*, const SkBBoxHierarchy*, SkDrawPict
ureCallback*); | 26 void SkRecordDraw(const SkRecord&, SkCanvas*, const SkBBoxHierarchy*, SkDrawPict
ureCallback*); |
| 29 | 27 |
| 30 // Draw a portion of an SkRecord into an SkCanvas while replacing clears with dr
awRects. | 28 // Draw a portion of an SkRecord into an SkCanvas while replacing clears with dr
awRects. |
| 31 // When drawing a portion of an SkRecord the CTM on the passed in canvas must be | 29 // When drawing a portion of an SkRecord the CTM on the passed in canvas must be |
| 32 // the composition of the replay matrix with the record-time CTM (for the portio
n | 30 // the composition of the replay matrix with the record-time CTM (for the portio
n |
| 33 // of the record that is being replayed). For setMatrix calls to behave correctl
y | 31 // of the record that is being replayed). For setMatrix calls to behave correctl
y |
| 34 // the initialCTM parameter must set to just the replay matrix. | 32 // the initialCTM parameter must set to just the replay matrix. |
| 35 void SkRecordPartialDraw(const SkRecord&, SkCanvas*, const SkRect&, unsigned sta
rt, unsigned stop, | 33 void SkRecordPartialDraw(const SkRecord&, SkCanvas*, const SkRect&, unsigned sta
rt, unsigned stop, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 75 } |
| 78 | 76 |
| 79 private: | 77 private: |
| 80 const SkRect fClearRect; | 78 const SkRect fClearRect; |
| 81 typedef Draw INHERITED; | 79 typedef Draw INHERITED; |
| 82 }; | 80 }; |
| 83 | 81 |
| 84 } // namespace SkRecords | 82 } // namespace SkRecords |
| 85 | 83 |
| 86 #endif//SkRecordDraw_DEFINED | 84 #endif//SkRecordDraw_DEFINED |
| OLD | NEW |