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

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

Issue 1768283002: Switch SkComposeImageFilter over to new onFilterImage interface (Closed) Base URL: https://skia.googlesource.com/skia.git@if-follow-on
Patch Set: Update for naming convention Created 4 years, 9 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 | « no previous file | src/effects/SkComposeImageFilter.cpp » ('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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 #ifndef SkComposeImageFilter_DEFINED 8 #ifndef SkComposeImageFilter_DEFINED
9 #define SkComposeImageFilter_DEFINED 9 #define SkComposeImageFilter_DEFINED
10 10
11 #include "SkImageFilter.h" 11 #include "SkImageFilter.h"
12 12
13 class SK_API SkComposeImageFilter : public SkImageFilter { 13 class SK_API SkComposeImageFilter : public SkImageFilter {
14 public: 14 public:
15 virtual ~SkComposeImageFilter();
16
17 static SkImageFilter* Create(SkImageFilter* outer, SkImageFilter* inner) { 15 static SkImageFilter* Create(SkImageFilter* outer, SkImageFilter* inner) {
18 if (NULL == outer) { 16 if (!outer) {
19 return SkSafeRef(inner); 17 return SkSafeRef(inner);
20 } 18 }
21 if (NULL == inner) { 19 if (!inner) {
22 return SkRef(outer); 20 return SkRef(outer);
23 } 21 }
24 SkImageFilter* inputs[2] = { outer, inner }; 22 SkImageFilter* inputs[2] = { outer, inner };
25 return new SkComposeImageFilter(inputs); 23 return new SkComposeImageFilter(inputs);
26 } 24 }
27 void computeFastBounds(const SkRect& src, SkRect* dst) const override; 25 void computeFastBounds(const SkRect& src, SkRect* dst) const override;
28 26
29 SK_TO_STRING_OVERRIDE() 27 SK_TO_STRING_OVERRIDE()
30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeImageFilter) 28 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeImageFilter)
31 29
32 protected: 30 protected:
33 explicit SkComposeImageFilter(SkImageFilter* inputs[2]) : INHERITED(2, input s) { 31 explicit SkComposeImageFilter(SkImageFilter* inputs[2]) : INHERITED(2, input s) {
34 SkASSERT(inputs[0]); 32 SkASSERT(inputs[0]);
35 SkASSERT(inputs[1]); 33 SkASSERT(inputs[1]);
36 } 34 }
37 bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&, 35 SkSpecialImage* onFilterImage(SkSpecialImage* source, const Context&,
38 SkBitmap* result, SkIPoint* loc) const override ; 36 SkIPoint* offset) const override;
39 bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*, MapDirection) const override; 37 bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*, MapDirection) const override;
40 38
41 private: 39 private:
42 typedef SkImageFilter INHERITED; 40 typedef SkImageFilter INHERITED;
43 }; 41 };
44 42
45 #endif 43 #endif
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkComposeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698