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

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

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 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 SkDisplacementMapEffect_DEFINED 8 #ifndef SkDisplacementMapEffect_DEFINED
9 #define SkDisplacementMapEffect_DEFINED 9 #define SkDisplacementMapEffect_DEFINED
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; } 49 virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; }
50 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context & ctx, 50 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context & ctx,
51 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE; 51 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE;
52 #endif 52 #endif
53 53
54 protected: 54 protected:
55 SkDisplacementMapEffect(ChannelSelectorType xChannelSelector, 55 SkDisplacementMapEffect(ChannelSelectorType xChannelSelector,
56 ChannelSelectorType yChannelSelector, 56 ChannelSelectorType yChannelSelector,
57 SkScalar scale, SkImageFilter* inputs[2], 57 SkScalar scale, SkImageFilter* inputs[2],
58 const CropRect* cropRect); 58 const CropRect* cropRect);
59 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
59 explicit SkDisplacementMapEffect(SkReadBuffer& buffer); 60 explicit SkDisplacementMapEffect(SkReadBuffer& buffer);
61 #endif
60 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 62 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
61 63
62 private: 64 private:
63 ChannelSelectorType fXChannelSelector; 65 ChannelSelectorType fXChannelSelector;
64 ChannelSelectorType fYChannelSelector; 66 ChannelSelectorType fYChannelSelector;
65 SkScalar fScale; 67 SkScalar fScale;
66 typedef SkImageFilter INHERITED; 68 typedef SkImageFilter INHERITED;
67 const SkImageFilter* getDisplacementInput() const { return getInput(0); } 69 const SkImageFilter* getDisplacementInput() const { return getInput(0); }
68 const SkImageFilter* getColorInput() const { return getInput(1); } 70 const SkImageFilter* getColorInput() const { return getInput(1); }
69 }; 71 };
70 72
71 #endif 73 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698