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

Unified Diff: src/utils/SkLuaCanvas.cpp

Issue 835913002: Revert of move remaining virtual draw methods to onDraw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/SkDumpCanvas.cpp ('k') | src/utils/SkNWayCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkLuaCanvas.cpp
diff --git a/src/utils/SkLuaCanvas.cpp b/src/utils/SkLuaCanvas.cpp
index 68094f2ca0e2344f49e43f4c66204b33436bbe29..ca04ba9d22af4a67414c576513d195b4223c80ef 100644
--- a/src/utils/SkLuaCanvas.cpp
+++ b/src/utils/SkLuaCanvas.cpp
@@ -162,31 +162,31 @@
this->INHERITED::onClipRegion(deviceRgn, op);
}
-void SkLuaCanvas::onDrawPaint(const SkPaint& paint) {
+void SkLuaCanvas::drawPaint(const SkPaint& paint) {
AUTO_LUA("drawPaint");
lua.pushPaint(paint, "paint");
}
-void SkLuaCanvas::onDrawPoints(PointMode mode, size_t count,
+void SkLuaCanvas::drawPoints(PointMode mode, size_t count,
const SkPoint pts[], const SkPaint& paint) {
AUTO_LUA("drawPoints");
lua.pushArrayPoint(pts, SkToInt(count), "points");
lua.pushPaint(paint, "paint");
}
-void SkLuaCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) {
+void SkLuaCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
AUTO_LUA("drawOval");
lua.pushRect(rect, "rect");
lua.pushPaint(paint, "paint");
}
-void SkLuaCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
+void SkLuaCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
AUTO_LUA("drawRect");
lua.pushRect(rect, "rect");
lua.pushPaint(paint, "paint");
}
-void SkLuaCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) {
+void SkLuaCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
AUTO_LUA("drawRRect");
lua.pushRRect(rrect, "rrect");
lua.pushPaint(paint, "paint");
@@ -200,52 +200,31 @@
lua.pushPaint(paint, "paint");
}
-void SkLuaCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
+void SkLuaCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
AUTO_LUA("drawPath");
lua.pushPath(path, "path");
lua.pushPaint(paint, "paint");
}
-void SkLuaCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y,
+void SkLuaCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y,
+ const SkPaint* paint) {
+ AUTO_LUA("drawBitmap");
+ if (paint) {
+ lua.pushPaint(*paint, "paint");
+ }
+}
+
+void SkLuaCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
+ const SkRect& dst, const SkPaint* paint,
+ DrawBitmapRectFlags flags) {
+ AUTO_LUA("drawBitmapRectToRect");
+ if (paint) {
+ lua.pushPaint(*paint, "paint");
+ }
+}
+
+void SkLuaCanvas::drawSprite(const SkBitmap& bitmap, int x, int y,
const SkPaint* paint) {
- AUTO_LUA("drawBitmap");
- if (paint) {
- lua.pushPaint(*paint, "paint");
- }
-}
-
-void SkLuaCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
- const SkPaint* paint, DrawBitmapRectFlags flags) {
- AUTO_LUA("drawBitmapRect");
- if (paint) {
- lua.pushPaint(*paint, "paint");
- }
-}
-
-void SkLuaCanvas::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, const SkRect& dst,
- const SkPaint* paint) {
- AUTO_LUA("drawBitmapNine");
- if (paint) {
- lua.pushPaint(*paint, "paint");
- }
-}
-
-void SkLuaCanvas::onDrawImage(const SkImage* image, SkScalar x, SkScalar y, const SkPaint* paint) {
- AUTO_LUA("drawImage");
- if (paint) {
- lua.pushPaint(*paint, "paint");
- }
-}
-
-void SkLuaCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
- const SkPaint* paint) {
- AUTO_LUA("drawImageRect");
- if (paint) {
- lua.pushPaint(*paint, "paint");
- }
-}
-
-void SkLuaCanvas::onDrawSprite(const SkBitmap& bitmap, int x, int y, const SkPaint* paint) {
AUTO_LUA("drawSprite");
if (paint) {
lua.pushPaint(*paint, "paint");
@@ -297,7 +276,7 @@
this->INHERITED::onDrawPicture(picture, matrix, paint);
}
-void SkLuaCanvas::onDrawVertices(VertexMode vmode, int vertexCount,
+void SkLuaCanvas::drawVertices(VertexMode vmode, int vertexCount,
const SkPoint vertices[], const SkPoint texs[],
const SkColor colors[], SkXfermode* xmode,
const uint16_t indices[], int indexCount,
« 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