This trick will be used to remove deprecated SkPorterDuff API. But first
we need to add it so Android can be updated later.
BUG=skia:3178
R=scroggo@google.com
Review URL: https://codereview.chromium.org/
758133004
'SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG',
'SK_LEGACY_PICTURE_SIZE_API',
'SK_LEGACY_PICTURE_DRAW_API',
+ # TODO(tfarina): Remove this when Android is fixed. skbug.com/3178
+ 'SK_SUPPORT_LEGACY_PORTER_DUFF',
],
},
}
#include "SkColor.h"
#include "SkXfermode.h"
+//#define SK_SUPPORT_LEGACY_PORTER_DUFF
+
+// Temporary guard until we can remove the dependencies in android. Then we
+// plan to remove this entirely.
+#ifdef SK_SUPPORT_LEGACY_PORTER_DUFF
+
class SkXfermode;
class SK_API SkPorterDuff {
} SK_ATTR_DEPRECATED("use SkXfermode::Mode");
#endif
+
+#endif
#include "SkPorterDuff.h"
#include "SkXfermode.h"
+#ifdef SK_SUPPORT_LEGACY_PORTER_DUFF
+
/* This file just exists as a compatibility layer, gluing the PorterDuff API
into the (extended) SkXfermode API
*/
SkXfermodeProc16 SkPorterDuff::GetXfermodeProc16(Mode mode, SkColor srcColor) {
return SkXfermode::GetProc16(gPairs[mode].fXF, srcColor);
}
+
+#endif