diff options
author | fmalita <fmalita@chromium.org> | 2016-01-28 13:14:53 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-28 13:14:53 -0800 |
commit | 54d60293cecb384de5683d9bea925c97f6ed485b (patch) | |
tree | d7df8e90ad477ef82577a60c1a9039261e1cae5e /include | |
parent | 5962957d958d95967189ee1f4eae7df2dab125a1 (diff) |
SaveFlags begone!
This is now dead code (post https://codereview.chromium.org/1636103002).
R=reed@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1648773002
Review URL: https://codereview.chromium.org/1648773002
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkCanvas.h | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 506912eb50..2812b32856 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -285,35 +285,6 @@ public: /////////////////////////////////////////////////////////////////////////// -#ifdef SK_SUPPORT_LEGACY_SAVEFLAGS - enum SaveFlags { - /** save the matrix state, restoring it on restore() */ - // [deprecated] kMatrix_SaveFlag = 0x01, - kMatrix_SaveFlag = 0x01, - /** save the clip state, restoring it on restore() */ - // [deprecated] kClip_SaveFlag = 0x02, - kClip_SaveFlag = 0x02, - /** the layer needs to support per-pixel alpha */ - kHasAlphaLayer_SaveFlag = 0x04, - /** the layer needs to support 8-bits per color component */ - kFullColorLayer_SaveFlag = 0x08, - /** - * the layer should clip against the bounds argument - * - * if SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG is undefined, this is treated as always on. - */ - kClipToLayer_SaveFlag = 0x10, - - // helper masks for common choices - // [deprecated] kMatrixClip_SaveFlag = 0x03, - kMatrixClip_SaveFlag = 0x03, -#ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG - kARGB_NoClipLayer_SaveFlag = 0x0F, -#endif - kARGB_ClipLayer_SaveFlag = 0x1F - }; -#endif - /** This call saves the current matrix, clip, and drawFilter, and pushes a copy onto a private stack. Subsequent calls to translate, scale, rotate, skew, concat or clipRect, clipPath, and setDrawFilter all @@ -349,26 +320,6 @@ public: */ int saveLayerPreserveLCDTextRequests(const SkRect* bounds, const SkPaint* paint); -#ifdef SK_SUPPORT_LEGACY_SAVEFLAGS - /** DEPRECATED - use saveLayer(const SkRect*, const SkPaint*) instead. - - This behaves the same as saveLayer(const SkRect*, const SkPaint*), - but it allows fine-grained control of which state bits to be saved - (and subsequently restored). - - @param bounds (may be null) This rect, if non-null, is used as a hint to - limit the size of the offscreen, and thus drawing may be - clipped to it, though that clipping is not guaranteed to - happen. If exact clipping is desired, use clipRect(). - @param paint (may be null) This is copied, and is applied to the - offscreen when restore() is called - @param flags LayerFlags - @return The value to pass to restoreToCount() to balance this save() - */ - SK_ATTR_EXTERNALLY_DEPRECATED("SaveFlags use is deprecated") - int saveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags flags); -#endif - /** This behaves the same as save(), but in addition it allocates an offscreen bitmap. All drawing calls are directed there, and only when the balancing call to restore() is made is that offscreen transfered to @@ -382,25 +333,6 @@ public: */ int saveLayerAlpha(const SkRect* bounds, U8CPU alpha); -#ifdef SK_SUPPORT_LEGACY_SAVEFLAGS - /** DEPRECATED - use saveLayerAlpha(const SkRect*, U8CPU) instead. - - This behaves the same as saveLayerAlpha(const SkRect*, U8CPU), - but it allows fine-grained control of which state bits to be saved - (and subsequently restored). - - @param bounds (may be null) This rect, if non-null, is used as a hint to - limit the size of the offscreen, and thus drawing may be - clipped to it, though that clipping is not guaranteed to - happen. If exact clipping is desired, use clipRect(). - @param alpha This is applied to the offscreen when restore() is called. - @param flags LayerFlags - @return The value to pass to restoreToCount() to balance this save() - */ - SK_ATTR_EXTERNALLY_DEPRECATED("SaveFlags use is deprecated") - int saveLayerAlpha(const SkRect* bounds, U8CPU alpha, SaveFlags flags); -#endif - enum { kIsOpaque_SaveLayerFlag = 1 << 0, kPreserveLCDText_SaveLayerFlag = 1 << 1, @@ -1362,16 +1294,8 @@ protected: bool clipRectBounds(const SkRect* bounds, SaveLayerFlags, SkIRect* intersection, const SkImageFilter* imageFilter = NULL); -#ifdef SK_SUPPORT_LEGACY_SAVEFLAGS - // Needed by SkiaCanvasProxy in Android. Make sure that class is updated - // before removing this method. - static uint32_t SaveLayerFlagsToSaveFlags(SaveLayerFlags); -#endif private: static bool BoundsAffectsClip(SaveLayerFlags); -#ifdef SK_SUPPORT_LEGACY_SAVEFLAGS - static uint32_t SaveFlagsToSaveLayerFlags(SaveFlags); -#endif static SaveLayerFlags LegacySaveFlagsToSaveLayerFlags(uint32_t legacySaveFlags); enum ShaderOverrideOpacity { @@ -1568,19 +1492,6 @@ private: }; #define SkAutoCanvasRestore(...) SK_REQUIRE_LOCAL_VAR(SkAutoCanvasRestore) -#ifdef SK_SUPPORT_LEGACY_SAVEFLAGS -static inline SkCanvas::SaveFlags operator|(const SkCanvas::SaveFlags lhs, - const SkCanvas::SaveFlags rhs) { - return static_cast<SkCanvas::SaveFlags>(static_cast<int>(lhs) | static_cast<int>(rhs)); -} - -static inline SkCanvas::SaveFlags& operator|=(SkCanvas::SaveFlags& lhs, - const SkCanvas::SaveFlags rhs) { - lhs = lhs | rhs; - return lhs; -} -#endif - class SkCanvasClipVisitor { public: virtual ~SkCanvasClipVisitor(); |