Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2014 Google Inc. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 #ifndef SkValidateImageFilter_DEFINED | |
|
Stephen White
2014/03/25 17:10:14
Bikeshed: the name doesn't really explain what it'
| |
| 9 #define SkValidateImageFilter_DEFINED | |
| 10 | |
| 11 #include "SkImageFilter.h" | |
| 12 #include "SkBitmap.h" | |
| 13 | |
| 14 class SK_API SkValidateImageFilter : public SkImageFilter { | |
| 15 public: | |
| 16 ~SkValidateImageFilter(); | |
| 17 | |
| 18 static SkValidateImageFilter* Create(SkImageFilter* input = NULL) { | |
| 19 return SkNEW_ARGS(SkValidateImageFilter, (input)); | |
| 20 } | |
| 21 | |
| 22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkValidateImageFilter) | |
| 23 | |
| 24 virtual bool onFilterImage(Proxy* proxy, | |
| 25 const SkBitmap& src, | |
| 26 const Context& ctx, | |
| 27 SkBitmap* dst, | |
| 28 SkIPoint* offset) const SK_OVERRIDE; | |
| 29 | |
| 30 #if SK_SUPPORT_GPU | |
| 31 virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; } | |
| 32 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context & ctx, | |
| 33 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE; | |
| 34 #endif | |
| 35 | |
| 36 protected: | |
| 37 explicit SkValidateImageFilter(SkReadBuffer& buffer); | |
| 38 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | |
| 39 | |
| 40 SkValidateImageFilter(SkImageFilter* input = NULL); | |
| 41 | |
| 42 private: | |
| 43 typedef SkImageFilter INHERITED; | |
| 44 }; | |
| 45 | |
| 46 #endif | |
| OLD | NEW |