Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: include/effects/SkMagnifierImageFilter.h

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/effects/SkLumaColorFilter.h ('k') | include/effects/SkMatrixConvolutionImageFilter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef SkMagnifierImageFilter_DEFINED 9 #ifndef SkMagnifierImageFilter_DEFINED
10 #define SkMagnifierImageFilter_DEFINED 10 #define SkMagnifierImageFilter_DEFINED
11 11
12 #include "SkRect.h" 12 #include "SkRect.h"
13 #include "SkImageFilter.h" 13 #include "SkImageFilter.h"
14 14
15 class SK_API SkMagnifierImageFilter : public SkImageFilter { 15 class SK_API SkMagnifierImageFilter : public SkImageFilter {
16 public: 16 public:
17 static SkMagnifierImageFilter* Create(const SkRect& srcRect, SkScalar inset, 17 static SkImageFilter* Create(const SkRect& src, SkScalar inset, SkImageFilte r* input = NULL);
18 SkImageFilter* input = NULL) {
19 return SkNEW_ARGS(SkMagnifierImageFilter, (srcRect, inset, input));
20 }
21 18
22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter) 19 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter)
23 20
24 protected: 21 protected:
25 SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, SkImageFilter* input); 22 SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, SkImageFilter* input);
23 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
26 explicit SkMagnifierImageFilter(SkReadBuffer& buffer); 24 explicit SkMagnifierImageFilter(SkReadBuffer& buffer);
25 #endif
27 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 26 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
28 27
29 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, 28 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
30 SkBitmap* result, SkIPoint* offset) const SK_OVER RIDE; 29 SkBitmap* result, SkIPoint* offset) const SK_OVER RIDE;
31 #if SK_SUPPORT_GPU 30 #if SK_SUPPORT_GPU
32 virtual bool asNewEffect(GrEffect** effect, GrTexture* texture, const SkMatr ix& matrix, 31 virtual bool asNewEffect(GrEffect** effect, GrTexture* texture, const SkMatr ix& matrix,
33 const SkIRect& bounds) const SK_OVERRIDE; 32 const SkIRect& bounds) const SK_OVERRIDE;
34 #endif 33 #endif
35 34
36 private: 35 private:
37 SkRect fSrcRect; 36 SkRect fSrcRect;
38 SkScalar fInset; 37 SkScalar fInset;
39 typedef SkImageFilter INHERITED; 38 typedef SkImageFilter INHERITED;
40 }; 39 };
41 40
42 #endif 41 #endif
OLDNEW
« no previous file with comments | « include/effects/SkLumaColorFilter.h ('k') | include/effects/SkMatrixConvolutionImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698