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

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

Issue 1567063002: Revert[2] of "add backdrop option to SaveLayerRec" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add test and fix for svg-savelayer optimization Created 4 years, 11 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/SkRecordOpts.cpp ('k') | tests/RecordOptsTest.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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 count, 330 count,
331 mode, 331 mode,
332 this->copy(cull)); 332 this->copy(cull));
333 } 333 }
334 334
335 void SkRecorder::willSave() { 335 void SkRecorder::willSave() {
336 APPEND(Save); 336 APPEND(Save);
337 } 337 }
338 338
339 SkCanvas::SaveLayerStrategy SkRecorder::getSaveLayerStrategy(const SaveLayerRec& rec) { 339 SkCanvas::SaveLayerStrategy SkRecorder::getSaveLayerStrategy(const SaveLayerRec& rec) {
340 APPEND(SaveLayer, this->copy(rec.fBounds), this->copy(rec.fPaint), rec.fSave LayerFlags); 340 APPEND(SaveLayer,
341 this->copy(rec.fBounds), this->copy(rec.fPaint), rec.fBackdrop, rec.f SaveLayerFlags);
341 return SkCanvas::kNoLayer_SaveLayerStrategy; 342 return SkCanvas::kNoLayer_SaveLayerStrategy;
342 } 343 }
343 344
344 void SkRecorder::didRestore() { 345 void SkRecorder::didRestore() {
345 APPEND(Restore, this->devBounds(), this->getTotalMatrix()); 346 APPEND(Restore, this->devBounds(), this->getTotalMatrix());
346 } 347 }
347 348
348 void SkRecorder::didConcat(const SkMatrix& matrix) { 349 void SkRecorder::didConcat(const SkMatrix& matrix) {
349 APPEND(Concat, matrix); 350 APPEND(Concat, matrix);
350 } 351 }
(...skipping 18 matching lines...) Expand all
369 INHERITED(onClipPath, path, op, edgeStyle); 370 INHERITED(onClipPath, path, op, edgeStyle);
370 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); 371 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle);
371 APPEND(ClipPath, this->devBounds(), path, opAA); 372 APPEND(ClipPath, this->devBounds(), path, opAA);
372 } 373 }
373 374
374 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 375 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
375 INHERITED(onClipRegion, deviceRgn, op); 376 INHERITED(onClipRegion, deviceRgn, op);
376 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); 377 APPEND(ClipRegion, this->devBounds(), deviceRgn, op);
377 } 378 }
378 379
OLDNEW
« no previous file with comments | « src/core/SkRecordOpts.cpp ('k') | tests/RecordOptsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698