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

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

Issue 2130643004: drawTextRSXform (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update util canvases Created 4 years, 5 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
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 266 }
267 267
268 void SkLuaCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const Sk Path& path, 268 void SkLuaCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const Sk Path& path,
269 const SkMatrix* matrix, const SkPaint& paint) { 269 const SkMatrix* matrix, const SkPaint& paint) {
270 AUTO_LUA("drawTextOnPath"); 270 AUTO_LUA("drawTextOnPath");
271 lua.pushPath(path, "path"); 271 lua.pushPath(path, "path");
272 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength); 272 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength);
273 lua.pushPaint(paint, "paint"); 273 lua.pushPaint(paint, "paint");
274 } 274 }
275 275
276 void SkLuaCanvas::onDrawTextRSXform(const void* text, size_t byteLength, const S kRSXform xform[],
277 const SkRect* cull, const SkPaint& paint) {
278 AUTO_LUA("drawTextRSXform");
279 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength);
280 // TODO: export other params
281 lua.pushPaint(paint, "paint");
282 }
283
276 void SkLuaCanvas::onDrawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, 284 void SkLuaCanvas::onDrawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y,
277 const SkPaint &paint) { 285 const SkPaint &paint) {
278 AUTO_LUA("drawTextBlob"); 286 AUTO_LUA("drawTextBlob");
279 lua.pushTextBlob(blob, "blob"); 287 lua.pushTextBlob(blob, "blob");
280 lua.pushScalar(x, "x"); 288 lua.pushScalar(x, "x");
281 lua.pushScalar(y, "y"); 289 lua.pushScalar(y, "y");
282 lua.pushPaint(paint, "paint"); 290 lua.pushPaint(paint, "paint");
283 } 291 }
284 292
285 void SkLuaCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix , 293 void SkLuaCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix ,
286 const SkPaint* paint) { 294 const SkPaint* paint) {
287 AUTO_LUA("drawPicture"); 295 AUTO_LUA("drawPicture");
288 // call through so we can see the nested picture ops 296 // call through so we can see the nested picture ops
289 this->INHERITED::onDrawPicture(picture, matrix, paint); 297 this->INHERITED::onDrawPicture(picture, matrix, paint);
290 } 298 }
291 299
292 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount, 300 void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount,
293 const SkPoint vertices[], const SkPoint texs[], 301 const SkPoint vertices[], const SkPoint texs[],
294 const SkColor colors[], SkXfermode* xmode, 302 const SkColor colors[], SkXfermode* xmode,
295 const uint16_t indices[], int indexCount, 303 const uint16_t indices[], int indexCount,
296 const SkPaint& paint) { 304 const SkPaint& paint) {
297 AUTO_LUA("drawVertices"); 305 AUTO_LUA("drawVertices");
298 lua.pushPaint(paint, "paint"); 306 lua.pushPaint(paint, "paint");
299 } 307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698