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

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

Issue 13602013: Allow single-pass filters (which use asNewEffect()) to participate in the image filter DAG. This w… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix return value of SkImageFilter::asNewEffect(). Created 7 years, 8 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
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 virtual bool asNewEffect(GrEffectRef** effect, GrTexture* texture) const SK_ OVERRIDE; 20 virtual bool asNewEffect(GrEffectRef** effect, GrTexture* texture) const SK_ OVERRIDE;
21 #endif
20 22
21 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter) 23 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter)
22 24
23 protected: 25 protected:
24 explicit SkMagnifierImageFilter(SkFlattenableReadBuffer& buffer); 26 explicit SkMagnifierImageFilter(SkFlattenableReadBuffer& buffer);
25 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 27 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
26 28
27 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, 29 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
28 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; 30 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
29 31
30 private: 32 private:
31 SkRect fSrcRect; 33 SkRect fSrcRect;
32 SkScalar fInset; 34 SkScalar fInset;
33 typedef SkImageFilter INHERITED; 35 typedef SkImageFilter INHERITED;
34 }; 36 };
35 37
36 #endif 38 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698