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

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

Issue 189913021: Implement support for a Context parameter in image filters (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Revert all but the Context changes. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « include/effects/SkTileImageFilter.h ('k') | include/gpu/SkGpuDevice.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 2013 The Android Open Source Project 2 * Copyright 2013 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 SkXfermodeImageFilter_DEFINED 8 #ifndef SkXfermodeImageFilter_DEFINED
9 #define SkXfermodeImageFilter_DEFINED 9 #define SkXfermodeImageFilter_DEFINED
10 10
(...skipping 15 matching lines...) Expand all
26 static SkXfermodeImageFilter* Create(SkXfermode* mode, SkImageFilter* backgr ound, 26 static SkXfermodeImageFilter* Create(SkXfermode* mode, SkImageFilter* backgr ound,
27 SkImageFilter* foreground = NULL, 27 SkImageFilter* foreground = NULL,
28 const CropRect* cropRect = NULL) { 28 const CropRect* cropRect = NULL) {
29 return SkNEW_ARGS(SkXfermodeImageFilter, (mode, background, foreground, cropRect)); 29 return SkNEW_ARGS(SkXfermodeImageFilter, (mode, background, foreground, cropRect));
30 } 30 }
31 31
32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkXfermodeImageFilter) 32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkXfermodeImageFilter)
33 33
34 virtual bool onFilterImage(Proxy* proxy, 34 virtual bool onFilterImage(Proxy* proxy,
35 const SkBitmap& src, 35 const SkBitmap& src,
36 const SkMatrix& ctm, 36 const Context& ctx,
37 SkBitmap* dst, 37 SkBitmap* dst,
38 SkIPoint* offset) const SK_OVERRIDE; 38 SkIPoint* offset) const SK_OVERRIDE;
39 #if SK_SUPPORT_GPU 39 #if SK_SUPPORT_GPU
40 virtual bool canFilterImageGPU() const SK_OVERRIDE { return !cropRectIsSet() ; } 40 virtual bool canFilterImageGPU() const SK_OVERRIDE { return !cropRectIsSet() ; }
41 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const SkMatri x& ctm, 41 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context & ctx,
42 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE; 42 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE;
43 #endif 43 #endif
44 44
45 protected: 45 protected:
46 explicit SkXfermodeImageFilter(SkReadBuffer& buffer); 46 explicit SkXfermodeImageFilter(SkReadBuffer& buffer);
47 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 47 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
48 48
49 #ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS 49 #ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
50 public: 50 public:
51 #endif 51 #endif
52 SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* background, 52 SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* background,
53 SkImageFilter* foreground = NULL, const CropRect* crop Rect = NULL); 53 SkImageFilter* foreground = NULL, const CropRect* crop Rect = NULL);
54 54
55 private: 55 private:
56 SkXfermode* fMode; 56 SkXfermode* fMode;
57 typedef SkImageFilter INHERITED; 57 typedef SkImageFilter INHERITED;
58 }; 58 };
59 59
60 #endif 60 #endif
OLDNEW
« no previous file with comments | « include/effects/SkTileImageFilter.h ('k') | include/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698