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

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

Issue 1462983002: Record concat as Concat. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix test Created 5 years, 1 month 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/SkRecordDraw.cpp ('k') | tests/RecordDrawTest.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 "SkBigPicture.h" 8 #include "SkBigPicture.h"
9 #include "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkPatchUtils.h" 10 #include "SkPatchUtils.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 SkCanvas::SaveFlags flags) { 345 SkCanvas::SaveFlags flags) {
346 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags); 346 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags);
347 return SkCanvas::kNoLayer_SaveLayerStrategy; 347 return SkCanvas::kNoLayer_SaveLayerStrategy;
348 } 348 }
349 349
350 void SkRecorder::didRestore() { 350 void SkRecorder::didRestore() {
351 APPEND(Restore, this->devBounds(), this->getTotalMatrix()); 351 APPEND(Restore, this->devBounds(), this->getTotalMatrix());
352 } 352 }
353 353
354 void SkRecorder::didConcat(const SkMatrix& matrix) { 354 void SkRecorder::didConcat(const SkMatrix& matrix) {
355 this->didSetMatrix(this->getTotalMatrix()); 355 APPEND(Concat, matrix);
356 } 356 }
357 357
358 void SkRecorder::didSetMatrix(const SkMatrix& matrix) { 358 void SkRecorder::didSetMatrix(const SkMatrix& matrix) {
359 SkDEVCODE(if (matrix != this->getTotalMatrix()) {
360 matrix.dump();
361 this->getTotalMatrix().dump();
362 SkASSERT(matrix == this->getTotalMatrix());
363 })
364 APPEND(SetMatrix, matrix); 359 APPEND(SetMatrix, matrix);
365 } 360 }
366 361
367 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { 362 void SkRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) {
368 INHERITED(onClipRect, rect, op, edgeStyle); 363 INHERITED(onClipRect, rect, op, edgeStyle);
369 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); 364 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle);
370 APPEND(ClipRect, this->devBounds(), rect, opAA); 365 APPEND(ClipRect, this->devBounds(), rect, opAA);
371 } 366 }
372 367
373 void SkRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { 368 void SkRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) {
374 INHERITED(onClipRRect, rrect, op, edgeStyle); 369 INHERITED(onClipRRect, rrect, op, edgeStyle);
375 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); 370 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle);
376 APPEND(ClipRRect, this->devBounds(), rrect, opAA); 371 APPEND(ClipRRect, this->devBounds(), rrect, opAA);
377 } 372 }
378 373
379 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { 374 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e dgeStyle) {
380 INHERITED(onClipPath, path, op, edgeStyle); 375 INHERITED(onClipPath, path, op, edgeStyle);
381 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); 376 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle);
382 APPEND(ClipPath, this->devBounds(), path, opAA); 377 APPEND(ClipPath, this->devBounds(), path, opAA);
383 } 378 }
384 379
385 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 380 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
386 INHERITED(onClipRegion, deviceRgn, op); 381 INHERITED(onClipRegion, deviceRgn, op);
387 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); 382 APPEND(ClipRegion, this->devBounds(), deviceRgn, op);
388 } 383 }
389 384
OLDNEW
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | tests/RecordDrawTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698