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

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

Issue 23295017: In image filters, apply the CTM and offset to the crop rect. This is necessary to compensate for bo… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix documentation comment. Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkImageFilter.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 SkMagnifierImageFilter(SkRect srcRect, SkScalar inset); 17 SkMagnifierImageFilter(SkRect srcRect, SkScalar inset);
18 18
19 #if SK_SUPPORT_GPU 19 #if SK_SUPPORT_GPU
20 virtual bool asNewEffect(GrEffectRef** effect, GrTexture* texture, const SkI Point& offset) const SK_OVERRIDE; 20 virtual bool asNewEffect(GrEffectRef** effect, GrTexture* texture, const SkM atrix& matrix) const SK_OVERRIDE;
21 #endif 21 #endif
22 22
23 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter) 23 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter)
24 24
25 protected: 25 protected:
26 explicit SkMagnifierImageFilter(SkFlattenableReadBuffer& buffer); 26 explicit SkMagnifierImageFilter(SkFlattenableReadBuffer& buffer);
27 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 27 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
28 28
29 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, 29 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
30 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; 30 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
31 31
32 private: 32 private:
33 SkRect fSrcRect; 33 SkRect fSrcRect;
34 SkScalar fInset; 34 SkScalar fInset;
35 typedef SkImageFilter INHERITED; 35 typedef SkImageFilter INHERITED;
36 }; 36 };
37 37
38 #endif 38 #endif
OLDNEW
« no previous file with comments | « include/core/SkImageFilter.h ('k') | include/effects/SkMatrixConvolutionImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698