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 1533953002: change signature for virtual related to saveLayer, passing SaveLayerRec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update comment Created 5 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/SkRecorder.h ('k') | src/core/SkRemote.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 "SkBigPicture.h" 8 #include "SkBigPicture.h"
9 #include "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkPatchUtils.h" 10 #include "SkPatchUtils.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 this->copy(colors, count), 329 this->copy(colors, count),
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::willSaveLayer(const SkRect* bounds, 339 SkCanvas::SaveLayerStrategy SkRecorder::getSaveLayerStrategy(const SaveLayerRec& rec) {
340 const SkPaint* paint, 340 APPEND(SaveLayer, this->copy(rec.fBounds), this->copy(rec.fPaint), rec.fSave LayerFlags);
341 SkCanvas::SaveFlags flags) {
342 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags);
343 return SkCanvas::kNoLayer_SaveLayerStrategy; 341 return SkCanvas::kNoLayer_SaveLayerStrategy;
344 } 342 }
345 343
346 void SkRecorder::didRestore() { 344 void SkRecorder::didRestore() {
347 APPEND(Restore, this->devBounds(), this->getTotalMatrix()); 345 APPEND(Restore, this->devBounds(), this->getTotalMatrix());
348 } 346 }
349 347
350 void SkRecorder::didConcat(const SkMatrix& matrix) { 348 void SkRecorder::didConcat(const SkMatrix& matrix) {
351 APPEND(Concat, matrix); 349 APPEND(Concat, matrix);
352 } 350 }
(...skipping 18 matching lines...) Expand all
371 INHERITED(onClipPath, path, op, edgeStyle); 369 INHERITED(onClipPath, path, op, edgeStyle);
372 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); 370 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle);
373 APPEND(ClipPath, this->devBounds(), path, opAA); 371 APPEND(ClipPath, this->devBounds(), path, opAA);
374 } 372 }
375 373
376 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 374 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
377 INHERITED(onClipRegion, deviceRgn, op); 375 INHERITED(onClipRegion, deviceRgn, op);
378 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); 376 APPEND(ClipRegion, this->devBounds(), deviceRgn, op);
379 } 377 }
380 378
OLDNEW
« no previous file with comments | « src/core/SkRecorder.h ('k') | src/core/SkRemote.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698