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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 DRAW(DrawPath, drawPath(r.path, r.paint)); | 82 DRAW(DrawPath, drawPath(r.path, r.paint)); |
83 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode.get(), r.pain
t)); | 83 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode.get(), r.pain
t)); |
84 DRAW(DrawPicture, drawPicture(r.picture, r.matrix, r.paint)); | 84 DRAW(DrawPicture, drawPicture(r.picture, r.matrix, r.paint)); |
85 DRAW(DrawPoints, drawPoints(r.mode, r.count, r.pts, r.paint)); | 85 DRAW(DrawPoints, drawPoints(r.mode, r.count, r.pts, r.paint)); |
86 DRAW(DrawPosText, drawPosText(r.text, r.byteLength, r.pos, r.paint)); | 86 DRAW(DrawPosText, drawPosText(r.text, r.byteLength, r.pos, r.paint)); |
87 DRAW(DrawPosTextH, drawPosTextH(r.text, r.byteLength, r.xpos, r.y, r.paint)); | 87 DRAW(DrawPosTextH, drawPosTextH(r.text, r.byteLength, r.xpos, r.y, r.paint)); |
88 DRAW(DrawRRect, drawRRect(r.rrect, r.paint)); | 88 DRAW(DrawRRect, drawRRect(r.rrect, r.paint)); |
89 DRAW(DrawRect, drawRect(r.rect, r.paint)); | 89 DRAW(DrawRect, drawRect(r.rect, r.paint)); |
90 DRAW(DrawSprite, drawSprite(shallow_copy(r.bitmap), r.left, r.top, r.paint)); | 90 DRAW(DrawSprite, drawSprite(shallow_copy(r.bitmap), r.left, r.top, r.paint)); |
91 DRAW(DrawText, drawText(r.text, r.byteLength, r.x, r.y, r.paint)); | 91 DRAW(DrawText, drawText(r.text, r.byteLength, r.x, r.y, r.paint)); |
| 92 DRAW(DrawTextBlob, drawTextBlob(r.blob, r.x, r.y, r.paint)); |
92 DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, r.matrix, r.pa
int)); | 93 DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, r.matrix, r.pa
int)); |
93 DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.co
lors, | 94 DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.co
lors, |
94 r.xmode.get(), r.indices, r.indexCount, r.paint)
); | 95 r.xmode.get(), r.indices, r.indexCount, r.paint)
); |
95 #undef DRAW | 96 #undef DRAW |
96 | 97 |
97 | 98 |
98 // This is an SkRecord visitor that fills an SkBBoxHierarchy. | 99 // This is an SkRecord visitor that fills an SkBBoxHierarchy. |
99 // | 100 // |
100 // The interesting part here is how to calculate bounds for ops which don't | 101 // The interesting part here is how to calculate bounds for ops which don't |
101 // have intrinsic bounds. What is the bounds of a Save or a Translate? | 102 // have intrinsic bounds. What is the bounds of a Save or a Translate? |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 // Used to track the bounds of Save/Restore blocks and the control ops insid
e them. | 380 // Used to track the bounds of Save/Restore blocks and the control ops insid
e them. |
380 SkTDArray<SaveBounds> fSaveStack; | 381 SkTDArray<SaveBounds> fSaveStack; |
381 SkTDArray<unsigned> fControlIndices; | 382 SkTDArray<unsigned> fControlIndices; |
382 }; | 383 }; |
383 | 384 |
384 } // namespace SkRecords | 385 } // namespace SkRecords |
385 | 386 |
386 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) { | 387 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) { |
387 SkRecords::FillBounds(record, bbh); | 388 SkRecords::FillBounds(record, bbh); |
388 } | 389 } |
OLD | NEW |