Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Side by Side Diff: src/core/SkRecordDraw.cpp

Issue 777643003: use ClipOp instead of SkRegion for clipping (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/effects/SkXfermodeImageFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 #define DRAW(T, call) template <> void Draw::draw(const T& r) { fCanvas->call; } 85 #define DRAW(T, call) template <> void Draw::draw(const T& r) { fCanvas->call; }
86 DRAW(Restore, restore()); 86 DRAW(Restore, restore());
87 DRAW(Save, save()); 87 DRAW(Save, save());
88 DRAW(SaveLayer, saveLayer(r.bounds, r.paint, r.flags)); 88 DRAW(SaveLayer, saveLayer(r.bounds, r.paint, r.flags));
89 DRAW(PopCull, popCull()); 89 DRAW(PopCull, popCull());
90 DRAW(PushCull, pushCull(r.rect)); 90 DRAW(PushCull, pushCull(r.rect));
91 DRAW(Clear, clear(r.color)); 91 DRAW(Clear, clear(r.color));
92 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix))); 92 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix)));
93 93
94 DRAW(ClipPath, clipPath(r.path, r.opAA.op, r.opAA.aa)); 94 DRAW(ClipPath, legacyClipPath(r.path, r.opAA.op, r.opAA.aa));
95 DRAW(ClipRRect, clipRRect(r.rrect, r.opAA.op, r.opAA.aa)); 95 DRAW(ClipRRect, legacyClipRRect(r.rrect, r.opAA.op, r.opAA.aa));
96 DRAW(ClipRect, clipRect(r.rect, r.opAA.op, r.opAA.aa)); 96 DRAW(ClipRect, legacyClipRect(r.rect, r.opAA.op, r.opAA.aa));
97 DRAW(ClipRegion, clipRegion(r.region, r.op)); 97 DRAW(ClipRegion, legacyClipRegion(r.region, r.op));
98 98
99 DRAW(BeginCommentGroup, beginCommentGroup(r.description)); 99 DRAW(BeginCommentGroup, beginCommentGroup(r.description));
100 DRAW(AddComment, addComment(r.key, r.value)); 100 DRAW(AddComment, addComment(r.key, r.value));
101 DRAW(EndCommentGroup, endCommentGroup()); 101 DRAW(EndCommentGroup, endCommentGroup());
102 102
103 DRAW(DrawBitmap, drawBitmap(shallow_copy(r.bitmap), r.left, r.top, r.paint)); 103 DRAW(DrawBitmap, drawBitmap(shallow_copy(r.bitmap), r.left, r.top, r.paint));
104 DRAW(DrawBitmapMatrix, drawBitmapMatrix(shallow_copy(r.bitmap), r.matrix, r.pain t)); 104 DRAW(DrawBitmapMatrix, drawBitmapMatrix(shallow_copy(r.bitmap), r.matrix, r.pain t));
105 DRAW(DrawBitmapNine, drawBitmapNine(shallow_copy(r.bitmap), r.center, r.dst, r.p aint)); 105 DRAW(DrawBitmapNine, drawBitmapNine(shallow_copy(r.bitmap), r.center, r.dst, r.p aint));
106 DRAW(DrawBitmapRectToRect, 106 DRAW(DrawBitmapRectToRect,
107 drawBitmapRectToRect(shallow_copy(r.bitmap), r.src, r.dst, r.paint, 107 drawBitmapRectToRect(shallow_copy(r.bitmap), r.src, r.dst, r.paint,
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 SkRecords::CollectLayers visitor(cullRect, record, pictList, data); 801 SkRecords::CollectLayers visitor(cullRect, record, pictList, data);
802 802
803 for (unsigned curOp = 0; curOp < record.count(); curOp++) { 803 for (unsigned curOp = 0; curOp < record.count(); curOp++) {
804 visitor.setCurrentOp(curOp); 804 visitor.setCurrentOp(curOp);
805 record.visit<void>(curOp, visitor); 805 record.visit<void>(curOp, visitor);
806 } 806 }
807 807
808 visitor.cleanUp(bbh); 808 visitor.cleanUp(bbh);
809 } 809 }
810 810
OLDNEW
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/effects/SkXfermodeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698