| 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 "SkLayerInfo.h" | 8 #include "SkLayerInfo.h" |
| 9 #include "SkRecordDraw.h" | 9 #include "SkRecordDraw.h" |
| 10 #include "SkPatchUtils.h" | 10 #include "SkPatchUtils.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode, r.paint)); | 107 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode, r.paint)); |
| 108 DRAW(DrawPicture, drawPicture(r.picture, &r.matrix, r.paint)); | 108 DRAW(DrawPicture, drawPicture(r.picture, &r.matrix, r.paint)); |
| 109 DRAW(DrawPoints, drawPoints(r.mode, r.count, r.pts, r.paint)); | 109 DRAW(DrawPoints, drawPoints(r.mode, r.count, r.pts, r.paint)); |
| 110 DRAW(DrawPosText, drawPosText(r.text, r.byteLength, r.pos, r.paint)); | 110 DRAW(DrawPosText, drawPosText(r.text, r.byteLength, r.pos, r.paint)); |
| 111 DRAW(DrawPosTextH, drawPosTextH(r.text, r.byteLength, r.xpos, r.y, r.paint)); | 111 DRAW(DrawPosTextH, drawPosTextH(r.text, r.byteLength, r.xpos, r.y, r.paint)); |
| 112 DRAW(DrawRRect, drawRRect(r.rrect, r.paint)); | 112 DRAW(DrawRRect, drawRRect(r.rrect, r.paint)); |
| 113 DRAW(DrawRect, drawRect(r.rect, r.paint)); | 113 DRAW(DrawRect, drawRect(r.rect, r.paint)); |
| 114 DRAW(DrawSprite, drawSprite(r.bitmap.shallowCopy(), r.left, r.top, r.paint)); | 114 DRAW(DrawSprite, drawSprite(r.bitmap.shallowCopy(), r.left, r.top, r.paint)); |
| 115 DRAW(DrawText, drawText(r.text, r.byteLength, r.x, r.y, r.paint)); | 115 DRAW(DrawText, drawText(r.text, r.byteLength, r.x, r.y, r.paint)); |
| 116 DRAW(DrawTextBlob, drawTextBlob(r.blob, r.x, r.y, r.paint)); | 116 DRAW(DrawTextBlob, drawTextBlob(r.blob, r.x, r.y, r.paint)); |
| 117 DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, &r.matrix, r.p
aint)); | 117 DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, &r.matrix, r.m
ethod, r.paint)); |
| 118 DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.co
lors, | 118 DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.co
lors, |
| 119 r.xmode.get(), r.indices, r.indexCount, r.paint)
); | 119 r.xmode.get(), r.indices, r.indexCount, r.paint)
); |
| 120 #undef DRAW | 120 #undef DRAW |
| 121 | 121 |
| 122 template <> void Draw::draw(const DrawDrawable& r) { | 122 template <> void Draw::draw(const DrawDrawable& r) { |
| 123 SkASSERT(r.index >= 0); | 123 SkASSERT(r.index >= 0); |
| 124 SkASSERT(r.index < fDrawableCount); | 124 SkASSERT(r.index < fDrawableCount); |
| 125 if (fDrawables) { | 125 if (fDrawables) { |
| 126 SkASSERT(NULL == fDrawablePicts); | 126 SkASSERT(NULL == fDrawablePicts); |
| 127 fCanvas->drawDrawable(fDrawables[r.index]); | 127 fCanvas->drawDrawable(fDrawables[r.index]); |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 SkRecords::CollectLayers visitor(cullRect, record, pictList, data); | 787 SkRecords::CollectLayers visitor(cullRect, record, pictList, data); |
| 788 | 788 |
| 789 for (unsigned curOp = 0; curOp < record.count(); curOp++) { | 789 for (unsigned curOp = 0; curOp < record.count(); curOp++) { |
| 790 visitor.setCurrentOp(curOp); | 790 visitor.setCurrentOp(curOp); |
| 791 record.visit<void>(curOp, visitor); | 791 record.visit<void>(curOp, visitor); |
| 792 } | 792 } |
| 793 | 793 |
| 794 visitor.cleanUp(bbh); | 794 visitor.cleanUp(bbh); |
| 795 } | 795 } |
| 796 | 796 |
| OLD | NEW |