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

Unified Diff: include/core/SkCanvas.h

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 | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index f2cacf124d11e0818fcb17e9f68f25b15604dc8c..cb4fedefdc97038417b4eb5417503eb002bf9156 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -35,12 +35,6 @@
class GrRenderTarget;
class SkCanvasState;
-
-#ifdef SK_SUPPORT_LEGACY_CANVAS_VIRTUAL
- #define SK_LEGACY_CANVAS_VIRTUAL virtual
-#else
- #define SK_LEGACY_CANVAS_VIRTUAL
-#endif
/** \class SkCanvas
@@ -614,7 +608,7 @@
* specified paint.
* @param paint The paint used to fill the canvas
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawPaint(const SkPaint& paint);
+ virtual void drawPaint(const SkPaint& paint);
enum PointMode {
/** drawPoints draws each point separately */
@@ -646,8 +640,8 @@
@param pts Array of points to draw
@param paint The paint used to draw the points
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
- const SkPaint& paint);
+ virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
+ const SkPaint& paint);
/** Helper method for drawing a single point. See drawPoints() for a more
details.
@@ -678,7 +672,7 @@
@param rect The rect to be drawn
@param paint The paint used to draw the rect
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawRect(const SkRect& rect, const SkPaint& paint);
+ virtual void drawRect(const SkRect& rect, const SkPaint& paint);
/** Draw the specified rectangle using the specified paint. The rectangle
will be filled or framed based on the Style in the paint.
@@ -707,7 +701,7 @@
@param oval The rectangle bounds of the oval to be drawn
@param paint The paint used to draw the oval
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawOval(const SkRect& oval, const SkPaint&);
+ virtual void drawOval(const SkRect& oval, const SkPaint&);
/**
* Draw the specified RRect using the specified paint The rrect will be filled or stroked
@@ -716,7 +710,7 @@
* @param rrect The round-rect to draw
* @param paint The paint used to draw the round-rect
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawRRect(const SkRRect& rrect, const SkPaint& paint);
+ virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint);
/**
* Draw the annulus formed by the outer and inner rrects. The results
@@ -764,7 +758,7 @@
@param path The path to be drawn
@param paint The paint used to draw the path
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawPath(const SkPath& path, const SkPaint& paint);
+ virtual void drawPath(const SkPath& path, const SkPaint& paint);
/** Draw the specified image, with its top/left corner at (x,y), using the
specified paint, transformed by the current matrix.
@@ -774,7 +768,7 @@
@param top The position of the top side of the image being drawn
@param paint The paint used to draw the image, or NULL
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawImage(const SkImage* image, SkScalar left, SkScalar top,
+ virtual void drawImage(const SkImage* image, SkScalar left, SkScalar top,
const SkPaint* paint = NULL);
/** Draw the specified image, with the specified matrix applied (before the
canvas' matrix is applied).
@@ -785,7 +779,7 @@
image will be drawn
@param paint The paint used to draw the image, or NULL
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawImageRect(const SkImage* image, const SkRect* src,
+ virtual void drawImageRect(const SkImage* image, const SkRect* src,
const SkRect& dst,
const SkPaint* paint = NULL);
@@ -805,7 +799,7 @@
@param top The position of the top side of the bitmap being drawn
@param paint The paint used to draw the bitmap, or NULL
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
+ virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
const SkPaint* paint = NULL);
enum DrawBitmapRectFlags {
@@ -826,7 +820,7 @@
image will be drawn
@param paint The paint used to draw the bitmap, or NULL
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
+ virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
const SkRect& dst,
const SkPaint* paint = NULL,
DrawBitmapRectFlags flags = kNone_DrawBitmapRectFlag);
@@ -862,7 +856,7 @@
* - The corners shrink proportionally
* - The sides (along the shrink axis) and center are not drawn
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
+ virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
const SkRect& dst, const SkPaint* paint = NULL);
/** Draw the specified bitmap, with its top/left corner at (x,y),
@@ -876,7 +870,7 @@
@param top The position of the top side of the bitmap being drawn
@param paint The paint used to draw the bitmap, or NULL
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawSprite(const SkBitmap& bitmap, int left, int top,
+ virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
const SkPaint* paint = NULL);
/** Draw the text, with origin at (x,y), using the specified paint.
@@ -999,7 +993,7 @@
@param indexCount number of entries in the indices array (if not null)
@param paint Specifies the shader/texture if present.
*/
- SK_LEGACY_CANVAS_VIRTUAL void drawVertices(VertexMode vmode, int vertexCount,
+ virtual void drawVertices(VertexMode vmode, int vertexCount,
const SkPoint vertices[], const SkPoint texs[],
const SkColor colors[], SkXfermode* xmode,
const uint16_t indices[], int indexCount,
@@ -1202,24 +1196,6 @@
const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint);
virtual void onDrawDrawable(SkCanvasDrawable*);
-
- virtual void onDrawPaint(const SkPaint&);
- virtual void onDrawRect(const SkRect&, const SkPaint&);
- virtual void onDrawOval(const SkRect&, const SkPaint&);
- virtual void onDrawRRect(const SkRRect&, const SkPaint&);
- virtual void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&);
- virtual void onDrawVertices(VertexMode, int vertexCount, const SkPoint vertices[],
- const SkPoint texs[], const SkColor colors[], SkXfermode*,
- const uint16_t indices[], int indexCount, const SkPaint&);
- virtual void onDrawPath(const SkPath&, const SkPaint&);
- virtual void onDrawImage(const SkImage*, SkScalar dx, SkScalar dy, const SkPaint*);
- virtual void onDrawImageRect(const SkImage*, const SkRect*, const SkRect&, const SkPaint*);
- virtual void onDrawBitmap(const SkBitmap&, SkScalar dx, SkScalar dy, const SkPaint*);
- virtual void onDrawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&, const SkPaint*,
- DrawBitmapRectFlags);
- virtual void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst,
- const SkPaint*);
- virtual void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*);
enum ClipEdgeStyle {
kHard_ClipEdgeStyle,
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | include/core/SkImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698