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

Side by Side Diff: src/record/SkRecorder.cpp

Issue 229523002: SkRecord: make culling work if SkRecordAnnotateCullingPairs is called. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 8 months 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/record/SkRecordDraw.cpp ('k') | src/record/SkRecords.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "SkRecorder.h" 1 #include "SkRecorder.h"
2 #include "SkPicture.h" 2 #include "SkPicture.h"
3 3
4 // SkCanvas will fail in mysterious ways if it doesn't know the real width and h eight. 4 // SkCanvas will fail in mysterious ways if it doesn't know the real width and h eight.
5 SkRecorder::SkRecorder(SkRecord* record, int width, int height) 5 SkRecorder::SkRecorder(SkRecord* record, int width, int height)
6 : SkCanvas(width, height), fRecord(record) {} 6 : SkCanvas(width, height), fRecord(record) {}
7 7
8 // To make appending to fRecord a little less verbose. 8 // To make appending to fRecord a little less verbose.
9 #define APPEND(T, ...) \ 9 #define APPEND(T, ...) \
10 SkNEW_PLACEMENT_ARGS(fRecord->append<SkRecords::T>(), SkRecords::T, (__V A_ARGS__)) 10 SkNEW_PLACEMENT_ARGS(fRecord->append<SkRecords::T>(), SkRecords::T, (__V A_ARGS__))
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 SkCanvas::SaveFlags flags) { 189 SkCanvas::SaveFlags flags) {
190 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags); 190 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags);
191 return SkCanvas::kNoLayer_SaveLayerStrategy; 191 return SkCanvas::kNoLayer_SaveLayerStrategy;
192 } 192 }
193 193
194 void SkRecorder::willRestore() { 194 void SkRecorder::willRestore() {
195 APPEND(Restore); 195 APPEND(Restore);
196 } 196 }
197 197
198 void SkRecorder::onPushCull(const SkRect& rect) { 198 void SkRecorder::onPushCull(const SkRect& rect) {
199 APPEND(PushCull, rect); 199 APPEND(PushCull, rect, SkRecords::kUnsetPopOffset);
200 } 200 }
201 201
202 void SkRecorder::onPopCull() { 202 void SkRecorder::onPopCull() {
203 APPEND(PopCull); 203 APPEND(PopCull);
204 } 204 }
205 205
206 void SkRecorder::didConcat(const SkMatrix& matrix) { 206 void SkRecorder::didConcat(const SkMatrix& matrix) {
207 APPEND(Concat, matrix); 207 APPEND(Concat, matrix);
208 } 208 }
209 209
(...skipping 13 matching lines...) Expand all
223 APPEND(ClipRRect, rrect, op, edgeStyle == kSoft_ClipEdgeStyle); 223 APPEND(ClipRRect, rrect, op, edgeStyle == kSoft_ClipEdgeStyle);
224 } 224 }
225 225
226 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { 226 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e dgeStyle) {
227 APPEND(ClipPath, delay_copy(path), op, edgeStyle == kSoft_ClipEdgeStyle); 227 APPEND(ClipPath, delay_copy(path), op, edgeStyle == kSoft_ClipEdgeStyle);
228 } 228 }
229 229
230 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 230 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
231 APPEND(ClipRegion, delay_copy(deviceRgn), op); 231 APPEND(ClipRegion, delay_copy(deviceRgn), op);
232 } 232 }
OLDNEW
« no previous file with comments | « src/record/SkRecordDraw.cpp ('k') | src/record/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698