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