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

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

Issue 1529803004: Revert of remove drawSprite from canvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 void SkLuaCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst, 240 void SkLuaCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
241 const SkPaint* paint, SrcRectConstraint) { 241 const SkPaint* paint, SrcRectConstraint) {
242 AUTO_LUA("drawImageRect"); 242 AUTO_LUA("drawImageRect");
243 if (paint) { 243 if (paint) {
244 lua.pushPaint(*paint, "paint"); 244 lua.pushPaint(*paint, "paint");
245 } 245 }
246 } 246 }
247 247
248 void SkLuaCanvas::onDrawSprite(const SkBitmap& bitmap, int x, int y, const SkPai nt* paint) {
249 AUTO_LUA("drawSprite");
250 if (paint) {
251 lua.pushPaint(*paint, "paint");
252 }
253 }
254
248 void SkLuaCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, Sk Scalar y, 255 void SkLuaCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, Sk Scalar y,
249 const SkPaint& paint) { 256 const SkPaint& paint) {
250 AUTO_LUA("drawText"); 257 AUTO_LUA("drawText");
251 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength); 258 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength);
252 lua.pushPaint(paint, "paint"); 259 lua.pushPaint(paint, "paint");
253 } 260 }
254 261
255 void SkLuaCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPoi nt pos[], 262 void SkLuaCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPoi nt pos[],
256 const SkPaint& paint) { 263 const SkPaint& paint) {
257 AUTO_LUA("drawPosText"); 264 AUTO_LUA("drawPosText");
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 298 }
292 299
293 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, 300 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount,
294 const SkPoint vertices[], const SkPoint texs[], 301 const SkPoint vertices[], const SkPoint texs[],
295 const SkColor colors[], SkXfermode* xmode, 302 const SkColor colors[], SkXfermode* xmode,
296 const uint16_t indices[], int indexCount, 303 const uint16_t indices[], int indexCount,
297 const SkPaint& paint) { 304 const SkPaint& paint) {
298 AUTO_LUA("drawVertices"); 305 AUTO_LUA("drawVertices");
299 lua.pushPaint(paint, "paint"); 306 lua.pushPaint(paint, "paint");
300 } 307 }
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