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

Side by Side Diff: src/core/SkLocalMatrixImageFilter.h

Issue 1823573003: Change signatures of filter bounds methods to return a rect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Hide legacy API behind #ifdef; switch callers to new API 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The Android Open Source Project 2 * Copyright 2015 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 #ifndef SkLocalMatrixImageFilter_DEFINED 8 #ifndef SkLocalMatrixImageFilter_DEFINED
9 #define SkLocalMatrixImageFilter_DEFINED 9 #define SkLocalMatrixImageFilter_DEFINED
10 10
11 #include "SkImageFilter.h" 11 #include "SkImageFilter.h"
12 #include "SkReadBuffer.h" 12 #include "SkReadBuffer.h"
13 #include "SkString.h" 13 #include "SkString.h"
14 14
15 /** 15 /**
16 * Wraps another imagefilter + matrix, such that using this filter will give th e same result 16 * Wraps another imagefilter + matrix, such that using this filter will give th e same result
17 * as using the wrapped filter with the matrix applied to its context. 17 * as using the wrapped filter with the matrix applied to its context.
18 */ 18 */
19 class SkLocalMatrixImageFilter : public SkImageFilter { 19 class SkLocalMatrixImageFilter : public SkImageFilter {
20 public: 20 public:
21 static SkImageFilter* Create(const SkMatrix& localM, SkImageFilter* input); 21 static SkImageFilter* Create(const SkMatrix& localM, SkImageFilter* input);
22 22
23 SK_TO_STRING_OVERRIDE() 23 SK_TO_STRING_OVERRIDE()
24 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLocalMatrixImageFilter ) 24 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLocalMatrixImageFilter )
25 25
26 protected: 26 protected:
27 void flatten(SkWriteBuffer&) const override; 27 void flatten(SkWriteBuffer&) const override;
28 bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&, 28 bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&,
29 SkBitmap* result, SkIPoint* offset) const overr ide; 29 SkBitmap* result, SkIPoint* offset) const overr ide;
30 bool onFilterBounds(const SkIRect& src, const SkMatrix&, SkIRect* dst, 30 SkIRect onFilterBounds(const SkIRect& src, const SkMatrix&, MapDirection) co nst override;
31 MapDirection) const override;
32 31
33 private: 32 private:
34 SkLocalMatrixImageFilter(const SkMatrix& localM, SkImageFilter* input); 33 SkLocalMatrixImageFilter(const SkMatrix& localM, SkImageFilter* input);
35 34
36 SkMatrix fLocalM; 35 SkMatrix fLocalM;
37 36
38 typedef SkImageFilter INHERITED; 37 typedef SkImageFilter INHERITED;
39 }; 38 };
40 39
41 #endif 40 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698