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

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

Issue 499413002: SkTextBlob plumbing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review comments Created 6 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 261 }
262 262
263 void SkLuaCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const Sk Path& path, 263 void SkLuaCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const Sk Path& path,
264 const SkMatrix* matrix, const SkPaint& paint) { 264 const SkMatrix* matrix, const SkPaint& paint) {
265 AUTO_LUA("drawTextOnPath"); 265 AUTO_LUA("drawTextOnPath");
266 lua.pushPath(path, "path"); 266 lua.pushPath(path, "path");
267 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength); 267 lua.pushEncodedText(paint.getTextEncoding(), text, byteLength);
268 lua.pushPaint(paint, "paint"); 268 lua.pushPaint(paint, "paint");
269 } 269 }
270 270
271 void SkLuaCanvas::onDrawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y,
272 const SkPaint &paint) {
273 AUTO_LUA("drawTextBlob");
274 lua.pushTextBlob(blob, "blob");
275 lua.pushScalar(x, "x");
276 lua.pushScalar(y, "y");
277 lua.pushPaint(paint, "paint");
278 }
279
271 void SkLuaCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix , 280 void SkLuaCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix ,
272 const SkPaint* paint) { 281 const SkPaint* paint) {
273 AUTO_LUA("drawPicture"); 282 AUTO_LUA("drawPicture");
274 // call through so we can see the nested picture ops 283 // call through so we can see the nested picture ops
275 this->INHERITED::onDrawPicture(picture, matrix, paint); 284 this->INHERITED::onDrawPicture(picture, matrix, paint);
276 } 285 }
277 286
278 void SkLuaCanvas::drawVertices(VertexMode vmode, int vertexCount, 287 void SkLuaCanvas::drawVertices(VertexMode vmode, int vertexCount,
279 const SkPoint vertices[], const SkPoint texs[], 288 const SkPoint vertices[], const SkPoint texs[],
280 const SkColor colors[], SkXfermode* xmode, 289 const SkColor colors[], SkXfermode* xmode,
281 const uint16_t indices[], int indexCount, 290 const uint16_t indices[], int indexCount,
282 const SkPaint& paint) { 291 const SkPaint& paint) {
283 AUTO_LUA("drawVertices"); 292 AUTO_LUA("drawVertices");
284 lua.pushPaint(paint, "paint"); 293 lua.pushPaint(paint, "paint");
285 } 294 }
286 295
287 void SkLuaCanvas::drawData(const void* data, size_t length) { 296 void SkLuaCanvas::drawData(const void* data, size_t length) {
288 AUTO_LUA("drawData"); 297 AUTO_LUA("drawData");
289 } 298 }
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