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

Side by Side Diff: src/utils/SkLuaCanvas.cpp

Issue 2355483002: abstract name of clipping ops, to transtion to a more restricted set (Closed)
Patch Set: no need for ifdef for globals Created 4 years, 3 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/utils/SkLua.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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 128 }
129 } 129 }
130 130
131 this->INHERITED::didConcat(matrix); 131 this->INHERITED::didConcat(matrix);
132 } 132 }
133 133
134 void SkLuaCanvas::didSetMatrix(const SkMatrix& matrix) { 134 void SkLuaCanvas::didSetMatrix(const SkMatrix& matrix) {
135 this->INHERITED::didSetMatrix(matrix); 135 this->INHERITED::didSetMatrix(matrix);
136 } 136 }
137 137
138 void SkLuaCanvas::onClipRect(const SkRect& r, SkRegion::Op op, ClipEdgeStyle edg eStyle) { 138 void SkLuaCanvas::onClipRect(const SkRect& r, ClipOp op, ClipEdgeStyle edgeStyle ) {
139 AUTO_LUA("clipRect"); 139 AUTO_LUA("clipRect");
140 lua.pushRect(r, "rect"); 140 lua.pushRect(r, "rect");
141 lua.pushBool(kSoft_ClipEdgeStyle == edgeStyle, "aa"); 141 lua.pushBool(kSoft_ClipEdgeStyle == edgeStyle, "aa");
142 this->INHERITED::onClipRect(r, op, edgeStyle); 142 this->INHERITED::onClipRect(r, op, edgeStyle);
143 } 143 }
144 144
145 void SkLuaCanvas::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeSty le edgeStyle) { 145 void SkLuaCanvas::onClipRRect(const SkRRect& rrect, ClipOp op, ClipEdgeStyle edg eStyle) {
146 AUTO_LUA("clipRRect"); 146 AUTO_LUA("clipRRect");
147 lua.pushRRect(rrect, "rrect"); 147 lua.pushRRect(rrect, "rrect");
148 lua.pushBool(kSoft_ClipEdgeStyle == edgeStyle, "aa"); 148 lua.pushBool(kSoft_ClipEdgeStyle == edgeStyle, "aa");
149 this->INHERITED::onClipRRect(rrect, op, edgeStyle); 149 this->INHERITED::onClipRRect(rrect, op, edgeStyle);
150 } 150 }
151 151
152 void SkLuaCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle) { 152 void SkLuaCanvas::onClipPath(const SkPath& path, ClipOp op, ClipEdgeStyle edgeSt yle) {
153 AUTO_LUA("clipPath"); 153 AUTO_LUA("clipPath");
154 lua.pushPath(path, "path"); 154 lua.pushPath(path, "path");
155 lua.pushBool(kSoft_ClipEdgeStyle == edgeStyle, "aa"); 155 lua.pushBool(kSoft_ClipEdgeStyle == edgeStyle, "aa");
156 this->INHERITED::onClipPath(path, op, edgeStyle); 156 this->INHERITED::onClipPath(path, op, edgeStyle);
157 } 157 }
158 158
159 void SkLuaCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 159 void SkLuaCanvas::onClipRegion(const SkRegion& deviceRgn, ClipOp op) {
160 AUTO_LUA("clipRegion"); 160 AUTO_LUA("clipRegion");
161 this->INHERITED::onClipRegion(deviceRgn, op); 161 this->INHERITED::onClipRegion(deviceRgn, op);
162 } 162 }
163 163
164 void SkLuaCanvas::onDrawPaint(const SkPaint& paint) { 164 void SkLuaCanvas::onDrawPaint(const SkPaint& paint) {
165 AUTO_LUA("drawPaint"); 165 AUTO_LUA("drawPaint");
166 lua.pushPaint(paint, "paint"); 166 lua.pushPaint(paint, "paint");
167 } 167 }
168 168
169 void SkLuaCanvas::onDrawPoints(PointMode mode, size_t count, 169 void SkLuaCanvas::onDrawPoints(PointMode mode, size_t count,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 } 308 }
309 309
310 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, 310 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount,
311 const SkPoint vertices[], const SkPoint texs[], 311 const SkPoint vertices[], const SkPoint texs[],
312 const SkColor colors[], SkXfermode* xmode, 312 const SkColor colors[], SkXfermode* xmode,
313 const uint16_t indices[], int indexCount, 313 const uint16_t indices[], int indexCount,
314 const SkPaint& paint) { 314 const SkPaint& paint) {
315 AUTO_LUA("drawVertices"); 315 AUTO_LUA("drawVertices");
316 lua.pushPaint(paint, "paint"); 316 lua.pushPaint(paint, "paint");
317 } 317 }
OLDNEW
« no previous file with comments | « src/utils/SkLua.cpp ('k') | src/utils/SkNWayCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698