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

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

Issue 1523053003: add backdrop option to SaveLayerRec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/SkPictureRecord.cpp ('k') | src/core/SkRecorder.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 "SkLayerInfo.h" 8 #include "SkLayerInfo.h"
9 #include "SkRecordDraw.h" 9 #include "SkRecordDraw.h"
10 #include "SkPatchUtils.h" 10 #include "SkPatchUtils.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 namespace SkRecords { 73 namespace SkRecords {
74 74
75 // NoOps draw nothing. 75 // NoOps draw nothing.
76 template <> void Draw::draw(const NoOp&) {} 76 template <> void Draw::draw(const NoOp&) {}
77 77
78 #define DRAW(T, call) template <> void Draw::draw(const T& r) { fCanvas->call; } 78 #define DRAW(T, call) template <> void Draw::draw(const T& r) { fCanvas->call; }
79 DRAW(Restore, restore()); 79 DRAW(Restore, restore());
80 DRAW(Save, save()); 80 DRAW(Save, save());
81 DRAW(SaveLayer, saveLayer(SkCanvas::SaveLayerRec(r.bounds, r.paint, r.saveLayerF lags))); 81 DRAW(SaveLayer, saveLayer(SkCanvas::SaveLayerRec(r.bounds, r.paint, r.backdrop, r.saveLayerFlags)));
82 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix))); 82 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix)));
83 DRAW(Concat, concat(r.matrix)); 83 DRAW(Concat, concat(r.matrix));
84 84
85 DRAW(ClipPath, clipPath(r.path, r.opAA.op, r.opAA.aa)); 85 DRAW(ClipPath, clipPath(r.path, r.opAA.op, r.opAA.aa));
86 DRAW(ClipRRect, clipRRect(r.rrect, r.opAA.op, r.opAA.aa)); 86 DRAW(ClipRRect, clipRRect(r.rrect, r.opAA.op, r.opAA.aa));
87 DRAW(ClipRect, clipRect(r.rect, r.opAA.op, r.opAA.aa)); 87 DRAW(ClipRect, clipRect(r.rect, r.opAA.op, r.opAA.aa));
88 DRAW(ClipRegion, clipRegion(r.region, r.op)); 88 DRAW(ClipRegion, clipRegion(r.region, r.op));
89 89
90 DRAW(DrawBitmap, drawBitmap(r.bitmap.shallowCopy(), r.left, r.top, r.paint)); 90 DRAW(DrawBitmap, drawBitmap(r.bitmap.shallowCopy(), r.left, r.top, r.paint));
91 DRAW(DrawBitmapNine, drawBitmapNine(r.bitmap.shallowCopy(), r.center, r.dst, r.p aint)); 91 DRAW(DrawBitmapNine, drawBitmapNine(r.bitmap.shallowCopy(), r.center, r.dst, r.p aint));
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord& record, SkRec t bounds[], 800 void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord& record, SkRec t bounds[],
801 const SkBigPicture::SnapshotArray* pictList, SkLayerI nfo* data) { 801 const SkBigPicture::SnapshotArray* pictList, SkLayerI nfo* data) {
802 SkRecords::CollectLayers visitor(cullRect, record, bounds, pictList, data); 802 SkRecords::CollectLayers visitor(cullRect, record, bounds, pictList, data);
803 for (int curOp = 0; curOp < record.count(); curOp++) { 803 for (int curOp = 0; curOp < record.count(); curOp++) {
804 visitor.setCurrentOp(curOp); 804 visitor.setCurrentOp(curOp);
805 record.visit<void>(curOp, visitor); 805 record.visit<void>(curOp, visitor);
806 } 806 }
807 visitor.cleanUp(); 807 visitor.cleanUp();
808 } 808 }
809 809
OLDNEW
« no previous file with comments | « src/core/SkPictureRecord.cpp ('k') | src/core/SkRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698