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 #include "SkRecordDraw.h" | 8 #include "SkRecordDraw.h" |
9 #include "SkTSort.h" | 9 #include "SkTSort.h" |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode.get(), r.pain
t)); | 87 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode.get(), r.pain
t)); |
88 DRAW(DrawPicture, drawPicture(r.picture, r.matrix, r.paint)); | 88 DRAW(DrawPicture, drawPicture(r.picture, r.matrix, r.paint)); |
89 DRAW(DrawPoints, drawPoints(r.mode, r.count, r.pts, r.paint)); | 89 DRAW(DrawPoints, drawPoints(r.mode, r.count, r.pts, r.paint)); |
90 DRAW(DrawPosText, drawPosText(r.text, r.byteLength, r.pos, r.paint)); | 90 DRAW(DrawPosText, drawPosText(r.text, r.byteLength, r.pos, r.paint)); |
91 DRAW(DrawPosTextH, drawPosTextH(r.text, r.byteLength, r.xpos, r.y, r.paint)); | 91 DRAW(DrawPosTextH, drawPosTextH(r.text, r.byteLength, r.xpos, r.y, r.paint)); |
92 DRAW(DrawRRect, drawRRect(r.rrect, r.paint)); | 92 DRAW(DrawRRect, drawRRect(r.rrect, r.paint)); |
93 DRAW(DrawRect, drawRect(r.rect, r.paint)); | 93 DRAW(DrawRect, drawRect(r.rect, r.paint)); |
94 DRAW(DrawSprite, drawSprite(shallow_copy(r.bitmap), r.left, r.top, r.paint)); | 94 DRAW(DrawSprite, drawSprite(shallow_copy(r.bitmap), r.left, r.top, r.paint)); |
95 DRAW(DrawText, drawText(r.text, r.byteLength, r.x, r.y, r.paint)); | 95 DRAW(DrawText, drawText(r.text, r.byteLength, r.x, r.y, r.paint)); |
96 DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, r.matrix, r.pa
int)); | 96 DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, r.matrix, r.pa
int)); |
| 97 DRAW(DrawTextBlob, drawTextBlob(r.blob, r.offset, r.paint)); |
97 DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.co
lors, | 98 DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.co
lors, |
98 r.xmode.get(), r.indices, r.indexCount, r.paint)
); | 99 r.xmode.get(), r.indices, r.indexCount, r.paint)
); |
99 #undef DRAW | 100 #undef DRAW |
100 | 101 |
101 | 102 |
102 // This is an SkRecord visitor that fills an SkBBoxHierarchy. | 103 // This is an SkRecord visitor that fills an SkBBoxHierarchy. |
103 class FillBounds : SkNoncopyable { | 104 class FillBounds : SkNoncopyable { |
104 public: | 105 public: |
105 explicit FillBounds(SkBBoxHierarchy* bbh) : fBBH(bbh), fIndex(0) {} | 106 explicit FillBounds(SkBBoxHierarchy* bbh) : fBBH(bbh), fIndex(0) {} |
106 ~FillBounds() { fBBH->flushDeferredInserts(); } | 107 ~FillBounds() { fBBH->flushDeferredInserts(); } |
(...skipping 16 matching lines...) Expand all Loading... |
123 }; | 124 }; |
124 | 125 |
125 } // namespace SkRecords | 126 } // namespace SkRecords |
126 | 127 |
127 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) { | 128 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) { |
128 SkASSERT(NULL != bbh); | 129 SkASSERT(NULL != bbh); |
129 for(SkRecords::FillBounds fb(bbh); fb.index() < record.count(); fb.next()) { | 130 for(SkRecords::FillBounds fb(bbh); fb.index() < record.count(); fb.next()) { |
130 record.visit<void>(fb.index(), fb); | 131 record.visit<void>(fb.index(), fb); |
131 } | 132 } |
132 } | 133 } |
OLD | NEW |