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

Side by Side Diff: src/utils/SkLuaCanvas.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/utils/SkDumpCanvas.cpp ('k') | src/utils/SkNWayCanvas.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 2013 Google Inc. 2 * Copyright 2013 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 "SkLuaCanvas.h" 8 #include "SkLuaCanvas.h"
9 #include "SkLua.h" 9 #include "SkLua.h"
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 , fFunc(func) { 79 , fFunc(func) {
80 } 80 }
81 81
82 SkLuaCanvas::~SkLuaCanvas() {} 82 SkLuaCanvas::~SkLuaCanvas() {}
83 83
84 void SkLuaCanvas::willSave() { 84 void SkLuaCanvas::willSave() {
85 AUTO_LUA("save"); 85 AUTO_LUA("save");
86 this->INHERITED::willSave(); 86 this->INHERITED::willSave();
87 } 87 }
88 88
89 SkCanvas::SaveLayerStrategy SkLuaCanvas::willSaveLayer(const SkRect* bounds, con st SkPaint* paint, 89 SkCanvas::SaveLayerStrategy SkLuaCanvas::getSaveLayerStrategy(const SaveLayerRec & rec) {
90 SaveFlags flags) {
91 AUTO_LUA("saveLayer"); 90 AUTO_LUA("saveLayer");
92 if (bounds) { 91 if (rec.fBounds) {
93 lua.pushRect(*bounds, "bounds"); 92 lua.pushRect(*rec.fBounds, "bounds");
94 } 93 }
95 if (paint) { 94 if (rec.fPaint) {
96 lua.pushPaint(*paint, "paint"); 95 lua.pushPaint(*rec.fPaint, "paint");
97 } 96 }
98 97
99 this->INHERITED::willSaveLayer(bounds, paint, flags); 98 (void)this->INHERITED::getSaveLayerStrategy(rec);
100 // No need for a layer. 99 // No need for a layer.
101 return kNoLayer_SaveLayerStrategy; 100 return kNoLayer_SaveLayerStrategy;
102 } 101 }
103 102
104 void SkLuaCanvas::willRestore() { 103 void SkLuaCanvas::willRestore() {
105 AUTO_LUA("restore"); 104 AUTO_LUA("restore");
106 this->INHERITED::willRestore(); 105 this->INHERITED::willRestore();
107 } 106 }
108 107
109 void SkLuaCanvas::didConcat(const SkMatrix& matrix) { 108 void SkLuaCanvas::didConcat(const SkMatrix& matrix) {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 290 }
292 291
293 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, 292 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount,
294 const SkPoint vertices[], const SkPoint texs[], 293 const SkPoint vertices[], const SkPoint texs[],
295 const SkColor colors[], SkXfermode* xmode, 294 const SkColor colors[], SkXfermode* xmode,
296 const uint16_t indices[], int indexCount, 295 const uint16_t indices[], int indexCount,
297 const SkPaint& paint) { 296 const SkPaint& paint) {
298 AUTO_LUA("drawVertices"); 297 AUTO_LUA("drawVertices");
299 lua.pushPaint(paint, "paint"); 298 lua.pushPaint(paint, "paint");
300 } 299 }
OLDNEW
« no previous file with comments | « src/utils/SkDumpCanvas.cpp ('k') | src/utils/SkNWayCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698