| OLD | NEW |
| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 bool SkLuaCanvas::concat(const SkMatrix& matrix) { | 133 bool SkLuaCanvas::concat(const SkMatrix& matrix) { |
| 134 AUTO_LUA("concat"); | 134 AUTO_LUA("concat"); |
| 135 return this->INHERITED::concat(matrix); | 135 return this->INHERITED::concat(matrix); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void SkLuaCanvas::setMatrix(const SkMatrix& matrix) { | 138 void SkLuaCanvas::setMatrix(const SkMatrix& matrix) { |
| 139 this->INHERITED::setMatrix(matrix); | 139 this->INHERITED::setMatrix(matrix); |
| 140 } | 140 } |
| 141 | 141 |
| 142 bool SkLuaCanvas::clipRect(const SkRect& r, SkRegion::Op op, bool doAA) { | 142 void SkLuaCanvas::onClipRect(const SkRect& r, SkRegion::Op op, ClipEdgeStyle edg
eStyle) { |
| 143 AUTO_LUA("clipRect"); | 143 AUTO_LUA("clipRect"); |
| 144 lua.pushRect(r, "rect"); | 144 lua.pushRect(r, "rect"); |
| 145 lua.pushBool(doAA, "aa"); | 145 lua.pushBool(kSoft_ClipEdgeStyle == edgeStyle, "aa"); |
| 146 return this->INHERITED::clipRect(r, op, doAA); | 146 this->INHERITED::onClipRect(r, op, edgeStyle); |
| 147 } | 147 } |
| 148 | 148 |
| 149 bool SkLuaCanvas::clipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA) { | 149 void SkLuaCanvas::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeSty
le edgeStyle) { |
| 150 AUTO_LUA("clipRRect"); | 150 AUTO_LUA("clipRRect"); |
| 151 lua.pushRRect(rrect, "rrect"); | 151 lua.pushRRect(rrect, "rrect"); |
| 152 lua.pushBool(doAA, "aa"); | 152 lua.pushBool(kSoft_ClipEdgeStyle == edgeStyle, "aa"); |
| 153 return this->INHERITED::clipRRect(rrect, op, doAA); | 153 this->INHERITED::onClipRRect(rrect, op, edgeStyle); |
| 154 } | 154 } |
| 155 | 155 |
| 156 bool SkLuaCanvas::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) { | 156 void SkLuaCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle
edgeStyle) { |
| 157 AUTO_LUA("clipPath"); | 157 AUTO_LUA("clipPath"); |
| 158 lua.pushPath(path, "path"); | 158 lua.pushPath(path, "path"); |
| 159 lua.pushBool(doAA, "aa"); | 159 lua.pushBool(kSoft_ClipEdgeStyle == edgeStyle, "aa"); |
| 160 return this->INHERITED::clipPath(path, op, doAA); | 160 this->INHERITED::onClipPath(path, op, edgeStyle); |
| 161 } | 161 } |
| 162 | 162 |
| 163 bool SkLuaCanvas::clipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 163 void SkLuaCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
| 164 AUTO_LUA("clipRegion"); | 164 AUTO_LUA("clipRegion"); |
| 165 return this->INHERITED::clipRegion(deviceRgn, op); | 165 this->INHERITED::onClipRegion(deviceRgn, op); |
| 166 } | 166 } |
| 167 | 167 |
| 168 void SkLuaCanvas::drawPaint(const SkPaint& paint) { | 168 void SkLuaCanvas::drawPaint(const SkPaint& paint) { |
| 169 AUTO_LUA("drawPaint"); | 169 AUTO_LUA("drawPaint"); |
| 170 lua.pushPaint(paint, "paint"); | 170 lua.pushPaint(paint, "paint"); |
| 171 } | 171 } |
| 172 | 172 |
| 173 void SkLuaCanvas::drawPoints(PointMode mode, size_t count, | 173 void SkLuaCanvas::drawPoints(PointMode mode, size_t count, |
| 174 const SkPoint pts[], const SkPaint& paint) { | 174 const SkPoint pts[], const SkPaint& paint) { |
| 175 AUTO_LUA("drawPoints"); | 175 AUTO_LUA("drawPoints"); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 const SkColor colors[], SkXfermode* xmode, | 283 const SkColor colors[], SkXfermode* xmode, |
| 284 const uint16_t indices[], int indexCount, | 284 const uint16_t indices[], int indexCount, |
| 285 const SkPaint& paint) { | 285 const SkPaint& paint) { |
| 286 AUTO_LUA("drawVertices"); | 286 AUTO_LUA("drawVertices"); |
| 287 lua.pushPaint(paint, "paint"); | 287 lua.pushPaint(paint, "paint"); |
| 288 } | 288 } |
| 289 | 289 |
| 290 void SkLuaCanvas::drawData(const void* data, size_t length) { | 290 void SkLuaCanvas::drawData(const void* data, size_t length) { |
| 291 AUTO_LUA("drawData"); | 291 AUTO_LUA("drawData"); |
| 292 } | 292 } |
| OLD | NEW |