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

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

Issue 468193003: Start tracking the CTM while filling the BBH in SkRecordDraw. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 4 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/core/SkRecorder.h ('k') | src/core/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 /* 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 "SkRecorder.h" 8 #include "SkRecorder.h"
9 #include "SkPatchUtils.h" 9 #include "SkPatchUtils.h"
10 #include "SkPicture.h" 10 #include "SkPicture.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 223
224 SkCanvas::SaveLayerStrategy SkRecorder::willSaveLayer(const SkRect* bounds, 224 SkCanvas::SaveLayerStrategy SkRecorder::willSaveLayer(const SkRect* bounds,
225 const SkPaint* paint, 225 const SkPaint* paint,
226 SkCanvas::SaveFlags flags) { 226 SkCanvas::SaveFlags flags) {
227 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags); 227 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags);
228 INHERITED(willSaveLayer, bounds, paint, flags); 228 INHERITED(willSaveLayer, bounds, paint, flags);
229 return SkCanvas::kNoLayer_SaveLayerStrategy; 229 return SkCanvas::kNoLayer_SaveLayerStrategy;
230 } 230 }
231 231
232 void SkRecorder::willRestore() { 232 void SkRecorder::didRestore() {
233 APPEND(Restore); 233 APPEND(Restore, this->getTotalMatrix());
234 INHERITED(willRestore); 234 INHERITED(didRestore);
235 } 235 }
236 236
237 void SkRecorder::onPushCull(const SkRect& rect) { 237 void SkRecorder::onPushCull(const SkRect& rect) {
238 APPEND(PushCull, rect); 238 APPEND(PushCull, rect);
239 } 239 }
240 240
241 void SkRecorder::onPopCull() { 241 void SkRecorder::onPopCull() {
242 APPEND(PopCull); 242 APPEND(PopCull);
243 } 243 }
244 244
245 void SkRecorder::didConcat(const SkMatrix& matrix) { 245 void SkRecorder::didConcat(const SkMatrix& matrix) {
246 APPEND(Concat, matrix); 246 APPEND(Concat, matrix);
247 INHERITED(didConcat, matrix); 247 INHERITED(didConcat, matrix);
248 } 248 }
249 249
250 void SkRecorder::didSetMatrix(const SkMatrix& matrix) { 250 void SkRecorder::didSetMatrix(const SkMatrix& matrix) {
251 SkASSERT(matrix == this->getTotalMatrix());
251 APPEND(SetMatrix, matrix); 252 APPEND(SetMatrix, matrix);
252 INHERITED(didSetMatrix, matrix); 253 INHERITED(didSetMatrix, matrix);
253 } 254 }
254 255
255 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { 256 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) {
256 APPEND(ClipRect, rect, op, edgeStyle == kSoft_ClipEdgeStyle); 257 APPEND(ClipRect, rect, op, edgeStyle == kSoft_ClipEdgeStyle);
257 INHERITED(onClipRect, rect, op, edgeStyle); 258 INHERITED(onClipRect, rect, op, edgeStyle);
258 } 259 }
259 260
260 void SkRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { 261 void SkRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) {
261 APPEND(ClipRRect, rrect, op, edgeStyle == kSoft_ClipEdgeStyle); 262 APPEND(ClipRRect, rrect, op, edgeStyle == kSoft_ClipEdgeStyle);
262 INHERITED(updateClipConservativelyUsingBounds, rrect.getBounds(), op, false) ; 263 INHERITED(updateClipConservativelyUsingBounds, rrect.getBounds(), op, false) ;
263 } 264 }
264 265
265 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { 266 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e dgeStyle) {
266 APPEND(ClipPath, delay_copy(path), op, edgeStyle == kSoft_ClipEdgeStyle); 267 APPEND(ClipPath, delay_copy(path), op, edgeStyle == kSoft_ClipEdgeStyle);
267 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is InverseFillType()); 268 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is InverseFillType());
268 } 269 }
269 270
270 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 271 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
271 APPEND(ClipRegion, delay_copy(deviceRgn), op); 272 APPEND(ClipRegion, delay_copy(deviceRgn), op);
272 INHERITED(onClipRegion, deviceRgn, op); 273 INHERITED(onClipRegion, deviceRgn, op);
273 } 274 }
OLDNEW
« no previous file with comments | « src/core/SkRecorder.h ('k') | src/core/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698