| 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 GrRecordReplaceDraw_DEFINED | 8 #ifndef GrRecordReplaceDraw_DEFINED |
| 9 #define GrRecordReplaceDraw_DEFINED | 9 #define GrRecordReplaceDraw_DEFINED |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 const SkMatrix& ctm) const; | 94 const SkMatrix& ctm) const; |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 SkTDynamicHash<ReplacementInfo, ReplacementInfo::Key> fReplacementHash; | 97 SkTDynamicHash<ReplacementInfo, ReplacementInfo::Key> fReplacementHash; |
| 98 | 98 |
| 99 void freeAll(); | 99 void freeAll(); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 // Draw an SkPicture into an SkCanvas replacing saveLayer/restore blocks with | 102 // Draw an SkPicture into an SkCanvas replacing saveLayer/restore blocks with |
| 103 // drawBitmap calls. A convenience wrapper around SkRecords::Draw. | 103 // drawBitmap calls. A convenience wrapper around SkRecords::Draw. |
| 104 void GrRecordReplaceDraw(const SkPicture*, | 104 // It returns the number of saveLayer/restore blocks replaced with drawBitmap ca
lls. |
| 105 SkCanvas*, | 105 int GrRecordReplaceDraw(const SkPicture*, |
| 106 const GrReplacements*, | 106 SkCanvas*, |
| 107 const SkMatrix& initialMatrix, | 107 const GrReplacements*, |
| 108 SkDrawPictureCallback*); | 108 const SkMatrix& initialMatrix, |
| 109 SkDrawPictureCallback*); |
| 109 | 110 |
| 110 #endif // GrRecordReplaceDraw_DEFINED | 111 #endif // GrRecordReplaceDraw_DEFINED |
| OLD | NEW |