diff options
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r-- | include/core/SkCanvas.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 620c5820b9..2a6100db8d 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -487,6 +487,17 @@ public: } /** + * Sets the max clip rectangle, which can be set by clipRect, clipRRect and + * clipPath and intersect the current clip with the specified rect. + * The max clip affects only future ops (it is not retroactive). + * We DON'T record the clip restriction in pictures. + * This is private API to be used only by Android framework. + * @param rect The maximum allowed clip in device coordinates. + * Empty rect means max clip is not enforced. + */ + void androidFramework_setDeviceClipRestriction(const SkIRect& rect); + + /** * Modify the current clip with the specified SkRRect. * @param rrect The rrect to combine with the current clip * @param op The region op to apply to the current clip @@ -1558,7 +1569,7 @@ private: enum { kMCRecSize = 128, // most recent measurement kMCRecCount = 32, // common depth for save/restores - kDeviceCMSize = 176, // most recent measurement + kDeviceCMSize = 184, // most recent measurement }; intptr_t fMCRecStorage[kMCRecSize * kMCRecCount / sizeof(intptr_t)]; intptr_t fDeviceCMStorage[kDeviceCMSize / sizeof(intptr_t)]; @@ -1578,6 +1589,7 @@ private: friend class SkSurface_Gpu; bool fDeviceCMDirty; // cleared by updateDeviceCMCache() + SkIRect fClipRestrictionRect = SkIRect::MakeEmpty(); void updateDeviceCMCache(); void doSave(); |