aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapDevice.h
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@google.com>2017-03-03 20:27:13 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-03 20:27:22 +0000
commitbaf06bc89a0ee2ac4033281e7310f6c727faab79 (patch)
tree13aca9c2e88a457a91f2d0dcf0f3418411ea63fc /src/core/SkBitmapDevice.h
parent94fc0fe016bbfeb097c829df513673d4fcbb38b3 (diff)
Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."""
This reverts commit cfaa63237b152ae216f1351207bce3ea9808814c. Reason for revert: speculative revert to fix Google3 Original change's description: > Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."" > > passes new (augmented) CanvasClipType unittest > fixed rasterclipstack::setnewsize > > This reverts commit ea5e676a7b75600edcde3912886486004ccd7626. > > BUG=skia: > > Change-Id: I004653e0f4d01454662f8516fccab0046486f273 > Reviewed-on: https://skia-review.googlesource.com/9185 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ibd7ee6383999f008eb6ee59c1c3f1c06a86044ea Reviewed-on: https://skia-review.googlesource.com/9230 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'src/core/SkBitmapDevice.h')
-rw-r--r--src/core/SkBitmapDevice.h35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/core/SkBitmapDevice.h b/src/core/SkBitmapDevice.h
index a97ad01457..266b2d9513 100644
--- a/src/core/SkBitmapDevice.h
+++ b/src/core/SkBitmapDevice.h
@@ -21,6 +21,7 @@
#include "SkSize.h"
#include "SkSurfaceProps.h"
+class SkDraw;
class SkImageFilterCache;
class SkMatrix;
class SkPaint;
@@ -69,12 +70,12 @@ protected:
and are handling any looping from the paint, and any effects from the
DrawFilter.
*/
- void drawPaint(const SkPaint& paint) override;
- void drawPoints(SkCanvas::PointMode mode, size_t count,
+ void drawPaint(const SkDraw&, const SkPaint& paint) override;
+ void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count,
const SkPoint[], const SkPaint& paint) override;
- void drawRect(const SkRect& r, const SkPaint& paint) override;
- void drawOval(const SkRect& oval, const SkPaint& paint) override;
- void drawRRect(const SkRRect& rr, const SkPaint& paint) override;
+ void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) override;
+ void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) override;
+ void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& paint) override;
/**
* If pathIsMutable, then the implementation is allowed to cast path to a
@@ -87,34 +88,34 @@ protected:
* affect the geometry/rasterization, then the pre matrix can just be
* pre-concated with the current matrix.
*/
- void drawPath(const SkPath&, const SkPaint&, const SkMatrix* prePathMatrix,
+ void drawPath(const SkDraw&, const SkPath&, const SkPaint&, const SkMatrix* prePathMatrix,
bool pathIsMutable) override;
- void drawBitmap(const SkBitmap&, const SkMatrix&, const SkPaint&) override;
- void drawSprite(const SkBitmap&, int x, int y, const SkPaint&) override;
+ void drawBitmap(const SkDraw&, const SkBitmap&, const SkMatrix&, const SkPaint&) override;
+ void drawSprite(const SkDraw&, const SkBitmap&, int x, int y, const SkPaint&) override;
/**
* The default impl. will create a bitmap-shader from the bitmap,
* and call drawRect with it.
*/
- void drawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&,
+ void drawBitmapRect(const SkDraw&, const SkBitmap&, const SkRect*, const SkRect&,
const SkPaint&, SkCanvas::SrcRectConstraint) override;
/**
* Does not handle text decoration.
* Decorations (underline and stike-thru) will be handled by SkCanvas.
*/
- void drawText(const void* text, size_t len, SkScalar x, SkScalar y,
+ void drawText(const SkDraw&, const void* text, size_t len, SkScalar x, SkScalar y,
const SkPaint&) override;
- void drawPosText(const void* text, size_t len, const SkScalar pos[],
+ void drawPosText(const SkDraw&, const void* text, size_t len, const SkScalar pos[],
int scalarsPerPos, const SkPoint& offset, const SkPaint& paint) override;
- void drawVertices(SkCanvas::VertexMode, int vertexCount, const SkPoint verts[],
+ void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCount, const SkPoint verts[],
const SkPoint texs[], const SkColor colors[], SkBlendMode,
const uint16_t indices[], int indexCount, const SkPaint&) override;
- void drawDevice(SkBaseDevice*, int x, int y, const SkPaint&) override;
+ void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const SkPaint&) override;
///////////////////////////////////////////////////////////////////////////
- void drawSpecial(SkSpecialImage*, int x, int y, const SkPaint&) override;
+ void drawSpecial(const SkDraw&, SkSpecialImage*, int x, int y, const SkPaint&) override;
sk_sp<SkSpecialImage> makeSpecial(const SkBitmap&) override;
sk_sp<SkSpecialImage> makeSpecial(const SkImage*) override;
sk_sp<SkSpecialImage> snapSpecial() override;
@@ -133,10 +134,7 @@ protected:
void onClipPath(const SkPath& path, SkClipOp, bool aa) override;
void onClipRegion(const SkRegion& deviceRgn, SkClipOp) override;
void onSetDeviceClipRestriction(SkIRect* mutableClipRestriction) override;
- bool onClipIsAA() const override;
- void onAsRgnClip(SkRegion*) const override;
void validateDevBounds(const SkIRect& r) override;
- ClipType onGetClipType() const override;
private:
friend class SkCanvas;
@@ -144,9 +142,8 @@ private:
friend class SkDraw;
friend class SkDrawIter;
friend class SkDeviceFilteredPaint;
- friend class SkSurface_Raster;
- class BDDraw;
+ friend class SkSurface_Raster;
// used to change the backend's pixels (and possibly config/rowbytes)
// but cannot change the width/height, so there should be no change to