aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-03-03 13:58:10 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-03 19:39:43 +0000
commitcfaa63237b152ae216f1351207bce3ea9808814c (patch)
tree4812b9bc5f6c8908ec2de778ef31c1447bc181a6 /include
parentb7115c68baef47b88f70b14d408e6cf5fab523f7 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 9e9d98a587..3ce4baeb59 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1359,6 +1359,10 @@ public:
*/
void temporary_internal_describeTopLayer(SkMatrix* matrix, SkIRect* clip_bounds);
+ /**
+ * Returns the global clip as a region. If the clip contains AA, then only the bounds
+ * of the clip may be returned.
+ */
void temporary_internal_getRgnClip(SkRegion*);
protected:
@@ -1523,7 +1527,7 @@ private:
SkBaseDevice* device() const;
const SkMatrix& matrix() const;
- const SkRasterClip& clip() const;
+ void clip(SkRegion*) const;
const SkPaint& paint() const;
int x() const;
int y() const;
@@ -1545,7 +1549,7 @@ private:
static void DrawDeviceWithFilter(SkBaseDevice* src, const SkImageFilter* filter,
SkBaseDevice* dst, const SkIPoint& dstOrigin,
- const SkMatrix& ctm, const SkClipStack* clipStack);
+ const SkMatrix& ctm);
enum ShaderOverrideOpacity {
kNone_ShaderOverrideOpacity, //!< there is no overriding shader (bitmap or image)
@@ -1567,7 +1571,6 @@ private:
class MCRec;
- sk_sp<SkClipStack> fClipStack;
SkDeque fMCStack;
// points to top of stack
MCRec* fMCRec;
@@ -1595,9 +1598,7 @@ private:
friend class SkSurface_Base;
friend class SkSurface_Gpu;
- bool fDeviceCMDirty; // cleared by updateDeviceCMCache()
SkIRect fClipRestrictionRect = SkIRect::MakeEmpty();
- void updateDeviceCMCache();
void doSave();
void checkForDeferredSave();
@@ -1667,14 +1668,11 @@ private:
*/
bool canDrawBitmapAsSprite(SkScalar x, SkScalar y, int w, int h, const SkPaint&);
- /** Return the clip stack. The clip stack stores all the individual
- * clips organized by the save/restore frame in which they were
- * added.
- * @return the current clip stack ("list" of individual clip elements)
+ /**
+ * Returns true if the clip (for any active layer) contains antialiasing.
+ * If the clip is empty, this will return false.
*/
- const SkClipStack* getClipStack() const {
- return fClipStack.get();
- }
+ bool androidFramework_isClipAA() const;
/**
* Keep track of the device clip bounds and if the matrix is scale-translate. This allows
@@ -1685,7 +1683,6 @@ private:
bool fAllowSoftClip;
bool fAllowSimplifyClip;
- const bool fConservativeRasterClip;
class AutoValidateClip : ::SkNoncopyable {
public: