#include "SkAlphaThresholdFilter.h"
#include "SkBitmap.h"
-#include "SkFlattenableBuffers.h"
+#include "SkReadBuffer.h"
+#include "SkWriteBuffer.h"
#include "SkRegion.h"
class SK_API SkAlphaThresholdFilterImpl : public SkImageFilter {
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkAlphaThresholdFilterImpl)
protected:
- explicit SkAlphaThresholdFilterImpl(SkFlattenableReadBuffer& buffer);
- virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
+ explicit SkAlphaThresholdFilterImpl(SkReadBuffer& buffer);
+ virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
- SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
+ SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
#if SK_SUPPORT_GPU
virtual bool asNewEffect(GrEffectRef** effect, GrTexture* texture,
const SkMatrix& matrix, const SkIRect& bounds) const SK_OVERRIDE;
#endif
-SkAlphaThresholdFilterImpl::SkAlphaThresholdFilterImpl(SkFlattenableReadBuffer& buffer)
+SkAlphaThresholdFilterImpl::SkAlphaThresholdFilterImpl(SkReadBuffer& buffer)
: INHERITED(1, buffer) {
fInnerThreshold = buffer.readScalar();
fOuterThreshold = buffer.readScalar();
}
#endif
-void SkAlphaThresholdFilterImpl::flatten(SkFlattenableWriteBuffer& buffer) const {
+void SkAlphaThresholdFilterImpl::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeScalar(fInnerThreshold);
buffer.writeScalar(fOuterThreshold);
bool SkAlphaThresholdFilterImpl::onFilterImage(Proxy*, const SkBitmap& src,
const SkMatrix& matrix, SkBitmap* dst,
- SkIPoint* offset) {
+ SkIPoint* offset) const {
SkASSERT(src.config() == SkBitmap::kARGB_8888_Config);
if (src.config() != SkBitmap::kARGB_8888_Config) {