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

Side by Side Diff: include/client/android/SkAvoidXfermode.h

Issue 1658623002: Add gpu implementation of SkAvoidXfermode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 10 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
« no previous file with comments | « gm/avoidxfermode2.cpp ('k') | src/effects/SkAvoidXfermode.cpp » ('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 2006 The Android Open Source Project 2 * Copyright 2006 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 SkAvoidXfermode_DEFINED 8 #ifndef SkAvoidXfermode_DEFINED
9 #define SkAvoidXfermode_DEFINED 9 #define SkAvoidXfermode_DEFINED
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 // overrides from SkXfermode 46 // overrides from SkXfermode
47 void xfer32(SkPMColor dst[], const SkPMColor src[], int count, 47 void xfer32(SkPMColor dst[], const SkPMColor src[], int count,
48 const SkAlpha aa[]) const override; 48 const SkAlpha aa[]) const override;
49 void xfer16(uint16_t dst[], const SkPMColor src[], int count, 49 void xfer16(uint16_t dst[], const SkPMColor src[], int count,
50 const SkAlpha aa[]) const override; 50 const SkAlpha aa[]) const override;
51 void xferA8(SkAlpha dst[], const SkPMColor src[], int count, 51 void xferA8(SkAlpha dst[], const SkPMColor src[], int count,
52 const SkAlpha aa[]) const override; 52 const SkAlpha aa[]) const override;
53 53
54 #if SK_SUPPORT_GPU
55 bool asFragmentProcessor(const GrFragmentProcessor** output,
56 const GrFragmentProcessor* dst) const override;
57 bool asXPFactory(GrXPFactory** xpf) const override;
58 #endif
59
54 SK_TO_STRING_OVERRIDE() 60 SK_TO_STRING_OVERRIDE()
55 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(AvoidXfermode) 61 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(AvoidXfermode)
56 62
57 protected: 63 protected:
58 SkAvoidXfermode(SkColor opColor, U8CPU tolerance, Mode mode); 64 SkAvoidXfermode(SkColor opColor, U8CPU tolerance, Mode mode);
59 void flatten(SkWriteBuffer&) const override; 65 void flatten(SkWriteBuffer&) const override;
60 66
61 private: 67 private:
62 SkColor fOpColor; 68 SkColor fOpColor;
63 uint32_t fDistMul; // x.14 cached from fTolerance 69 uint32_t fDistMul; // x.14 cached from fTolerance
64 uint8_t fTolerance; 70 uint8_t fTolerance;
65 Mode fMode; 71 Mode fMode;
66 72
67 typedef SkXfermode INHERITED; 73 typedef SkXfermode INHERITED;
68 }; 74 };
69 75
70 #endif 76 #endif
OLDNEW
« no previous file with comments | « gm/avoidxfermode2.cpp ('k') | src/effects/SkAvoidXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698