Chromium Code Reviews| Index: include/effects/SkValidateImageFilter.h |
| diff --git a/include/effects/SkValidateImageFilter.h b/include/effects/SkValidateImageFilter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b12566d5b0865bc22b3481ed6e45803f92339407 |
| --- /dev/null |
| +++ b/include/effects/SkValidateImageFilter.h |
| @@ -0,0 +1,46 @@ |
| +/* |
| + * Copyright 2014 Google Inc. |
| + * |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +#ifndef SkValidateImageFilter_DEFINED |
|
Stephen White
2014/03/25 17:10:14
Bikeshed: the name doesn't really explain what it'
|
| +#define SkValidateImageFilter_DEFINED |
| + |
| +#include "SkImageFilter.h" |
| +#include "SkBitmap.h" |
| + |
| +class SK_API SkValidateImageFilter : public SkImageFilter { |
| +public: |
| + ~SkValidateImageFilter(); |
| + |
| + static SkValidateImageFilter* Create(SkImageFilter* input = NULL) { |
| + return SkNEW_ARGS(SkValidateImageFilter, (input)); |
| + } |
| + |
| + SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkValidateImageFilter) |
| + |
| + virtual bool onFilterImage(Proxy* proxy, |
| + const SkBitmap& src, |
| + const Context& ctx, |
| + SkBitmap* dst, |
| + SkIPoint* offset) const SK_OVERRIDE; |
| + |
| +#if SK_SUPPORT_GPU |
| + virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; } |
| + virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, |
| + SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; |
| +#endif |
| + |
| +protected: |
| + explicit SkValidateImageFilter(SkReadBuffer& buffer); |
| + virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| + |
| + SkValidateImageFilter(SkImageFilter* input = NULL); |
| + |
| +private: |
| + typedef SkImageFilter INHERITED; |
| +}; |
| + |
| +#endif |