remove (dead) SK_SUPPORT_LEGACY_DRAWDATA and SK_SUPPORT_LEGACY_CANVAS_VIRTUAL

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/844053002
This commit is contained in:
reed 2015-01-09 14:17:40 -08:00 committed by Commit bot
parent a91dc3140c
commit 0846f1b1c4

View File

@ -36,12 +36,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
A Canvas encapsulates all of the state about drawing into a device (bitmap).
@ -614,7 +608,7 @@ public:
* specified paint.
* @param paint The paint used to fill the canvas
*/
SK_LEGACY_CANVAS_VIRTUAL void drawPaint(const SkPaint& paint);
void drawPaint(const SkPaint& paint);
enum PointMode {
/** drawPoints draws each point separately */
@ -646,8 +640,7 @@ public:
@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);
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 +671,7 @@ public:
@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);
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 +700,7 @@ public:
@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&);
void drawOval(const SkRect& oval, const SkPaint&);
/**
* Draw the specified RRect using the specified paint The rrect will be filled or stroked
@ -716,7 +709,7 @@ public:
* @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);
void drawRRect(const SkRRect& rrect, const SkPaint& paint);
/**
* Draw the annulus formed by the outer and inner rrects. The results
@ -764,7 +757,7 @@ public:
@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);
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,8 +767,7 @@ public:
@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,
const SkPaint* paint = NULL);
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,9 +777,8 @@ public:
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,
const SkRect& dst,
const SkPaint* paint = NULL);
void drawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
const SkPaint* paint = NULL);
/** Draw the specified bitmap, with its top/left corner at (x,y), using the
specified paint, transformed by the current matrix. Note: if the paint
@ -805,8 +796,8 @@ public:
@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,
const SkPaint* paint = NULL);
void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
const SkPaint* paint = NULL);
enum DrawBitmapRectFlags {
kNone_DrawBitmapRectFlag = 0x0,
@ -826,10 +817,9 @@ public:
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,
const SkRect& dst,
const SkPaint* paint = NULL,
DrawBitmapRectFlags flags = kNone_DrawBitmapRectFlag);
void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
const SkPaint* paint = NULL,
DrawBitmapRectFlags flags = kNone_DrawBitmapRectFlag);
void drawBitmapRect(const SkBitmap& bitmap, const SkRect& dst,
const SkPaint* paint = NULL) {
@ -862,8 +852,8 @@ public:
* - 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,
const SkRect& dst, const SkPaint* paint = NULL);
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),
NOT transformed by the current matrix. Note: if the paint
@ -876,8 +866,7 @@ public:
@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,
const SkPaint* paint = NULL);
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.
The origin is interpreted based on the Align setting in the paint.
@ -999,11 +988,11 @@ public:
@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,
const SkPoint vertices[], const SkPoint texs[],
const SkColor colors[], SkXfermode* xmode,
const uint16_t indices[], int indexCount,
const SkPaint& paint);
void drawVertices(VertexMode vmode, int vertexCount,
const SkPoint vertices[], const SkPoint texs[],
const SkColor colors[], SkXfermode* xmode,
const uint16_t indices[], int indexCount,
const SkPaint& paint);
/**
Draw a cubic coons patch
@ -1023,16 +1012,6 @@ public:
void EXPERIMENTAL_drawDrawable(SkCanvasDrawable*);
#ifdef SK_SUPPORT_LEGACY_DRAWDATA
/** Send a blob of data to the canvas.
For canvases that draw, this call is effectively a no-op, as the data
is not parsed, but just ignored. However, this call exists for
subclasses like SkPicture's recording canvas, that can store the data
and then play it back later (via another call to drawData).
*/
virtual void drawData(const void* /*data*/, size_t /*length*/) {}
#endif
/** Add comments. beginCommentGroup/endCommentGroup open/close a new group.
Each comment added via addComment is notionally attached to its
enclosing group. Top-level comments simply belong to no group.