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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 #define DRAW(T, call) template <> void Draw::draw(const T& r) { fCanvas->call; } | 80 #define DRAW(T, call) template <> void Draw::draw(const T& r) { fCanvas->call; } |
81 DRAW(Restore, restore()); | 81 DRAW(Restore, restore()); |
82 DRAW(Save, save()); | 82 DRAW(Save, save()); |
83 DRAW(SaveLayer, saveLayer(r.bounds, r.paint, r.flags)); | 83 DRAW(SaveLayer, saveLayer(r.bounds, r.paint, r.flags)); |
84 DRAW(PopCull, popCull()); | 84 DRAW(PopCull, popCull()); |
85 DRAW(PushCull, pushCull(r.rect)); | 85 DRAW(PushCull, pushCull(r.rect)); |
86 DRAW(Clear, clear(r.color)); | 86 DRAW(Clear, clear(r.color)); |
87 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix))); | 87 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix))); |
88 | 88 |
89 DRAW(ClipPath, clipPath(r.path, r.op, r.doAA)); | 89 DRAW(ClipPath, clipPath(r.path, r.opAA.op, r.opAA.aa)); |
90 DRAW(ClipRRect, clipRRect(r.rrect, r.op, r.doAA)); | 90 DRAW(ClipRRect, clipRRect(r.rrect, r.opAA.op, r.opAA.aa)); |
91 DRAW(ClipRect, clipRect(r.rect, r.op, r.doAA)); | 91 DRAW(ClipRect, clipRect(r.rect, r.opAA.op, r.opAA.aa)); |
92 DRAW(ClipRegion, clipRegion(r.region, r.op)); | 92 DRAW(ClipRegion, clipRegion(r.region, r.op)); |
93 | 93 |
94 DRAW(BeginCommentGroup, beginCommentGroup(r.description)); | 94 DRAW(BeginCommentGroup, beginCommentGroup(r.description)); |
95 DRAW(AddComment, addComment(r.key, r.value)); | 95 DRAW(AddComment, addComment(r.key, r.value)); |
96 DRAW(EndCommentGroup, endCommentGroup()); | 96 DRAW(EndCommentGroup, endCommentGroup()); |
97 | 97 |
98 DRAW(DrawBitmap, drawBitmap(shallow_copy(r.bitmap), r.left, r.top, r.paint)); | 98 DRAW(DrawBitmap, drawBitmap(shallow_copy(r.bitmap), r.left, r.top, r.paint)); |
99 DRAW(DrawBitmapMatrix, drawBitmapMatrix(shallow_copy(r.bitmap), r.matrix, r.pain
t)); | 99 DRAW(DrawBitmapMatrix, drawBitmapMatrix(shallow_copy(r.bitmap), r.matrix, r.pain
t)); |
100 DRAW(DrawBitmapNine, drawBitmapNine(shallow_copy(r.bitmap), r.center, r.dst, r.p
aint)); | 100 DRAW(DrawBitmapNine, drawBitmapNine(shallow_copy(r.bitmap), r.center, r.dst, r.p
aint)); |
101 DRAW(DrawBitmapRectToRect, | 101 DRAW(DrawBitmapRectToRect, |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 SkRecords::CollectLayers visitor(cullRect, record, data); | 754 SkRecords::CollectLayers visitor(cullRect, record, data); |
755 | 755 |
756 for (unsigned curOp = 0; curOp < record.count(); curOp++) { | 756 for (unsigned curOp = 0; curOp < record.count(); curOp++) { |
757 visitor.setCurrentOp(curOp); | 757 visitor.setCurrentOp(curOp); |
758 record.visit<void>(curOp, visitor); | 758 record.visit<void>(curOp, visitor); |
759 } | 759 } |
760 | 760 |
761 visitor.cleanUp(bbh); | 761 visitor.cleanUp(bbh); |
762 } | 762 } |
763 | 763 |
OLD | NEW |