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

Side by Side Diff: include/core/SkXfermode.h

Issue 17335008: remove dst/rendertarget support for kARGB_4444_Config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkXfermode_DEFINED 10 #ifndef SkXfermode_DEFINED
(...skipping 18 matching lines...) Expand all
29 class SK_API SkXfermode : public SkFlattenable { 29 class SK_API SkXfermode : public SkFlattenable {
30 public: 30 public:
31 SK_DECLARE_INST_COUNT(SkXfermode) 31 SK_DECLARE_INST_COUNT(SkXfermode)
32 32
33 SkXfermode() {} 33 SkXfermode() {}
34 34
35 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, 35 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count,
36 const SkAlpha aa[]) const; 36 const SkAlpha aa[]) const;
37 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, 37 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count,
38 const SkAlpha aa[]) const; 38 const SkAlpha aa[]) const;
39 virtual void xfer4444(uint16_t dst[], const SkPMColor src[], int count,
40 const SkAlpha aa[]) const;
41 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, 39 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count,
42 const SkAlpha aa[]) const; 40 const SkAlpha aa[]) const;
43 41
44 /** Enum of possible coefficients to describe some xfermodes 42 /** Enum of possible coefficients to describe some xfermodes
45 */ 43 */
46 enum Coeff { 44 enum Coeff {
47 kZero_Coeff, /** 0 */ 45 kZero_Coeff, /** 0 */
48 kOne_Coeff, /** 1 */ 46 kOne_Coeff, /** 1 */
49 kSC_Coeff, /** src color */ 47 kSC_Coeff, /** src color */
50 kISC_Coeff, /** inverse src color (i.e. 1 - sc) */ 48 kISC_Coeff, /** inverse src color (i.e. 1 - sc) */
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 */ 249 */
252 class SkProcXfermode : public SkXfermode { 250 class SkProcXfermode : public SkXfermode {
253 public: 251 public:
254 SkProcXfermode(SkXfermodeProc proc) : fProc(proc) {} 252 SkProcXfermode(SkXfermodeProc proc) : fProc(proc) {}
255 253
256 // overrides from SkXfermode 254 // overrides from SkXfermode
257 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, 255 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count,
258 const SkAlpha aa[]) const SK_OVERRIDE; 256 const SkAlpha aa[]) const SK_OVERRIDE;
259 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, 257 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count,
260 const SkAlpha aa[]) const SK_OVERRIDE; 258 const SkAlpha aa[]) const SK_OVERRIDE;
261 virtual void xfer4444(uint16_t dst[], const SkPMColor src[], int count,
262 const SkAlpha aa[]) const SK_OVERRIDE;
263 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, 259 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count,
264 const SkAlpha aa[]) const SK_OVERRIDE; 260 const SkAlpha aa[]) const SK_OVERRIDE;
265 261
266 SK_DEVELOPER_TO_STRING() 262 SK_DEVELOPER_TO_STRING()
267 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcXfermode) 263 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcXfermode)
268 264
269 protected: 265 protected:
270 SkProcXfermode(SkFlattenableReadBuffer&); 266 SkProcXfermode(SkFlattenableReadBuffer&);
271 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 267 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
272 268
273 // allow subclasses to update this after we unflatten 269 // allow subclasses to update this after we unflatten
274 void setProc(SkXfermodeProc proc) { 270 void setProc(SkXfermodeProc proc) {
275 fProc = proc; 271 fProc = proc;
276 } 272 }
277 273
278 private: 274 private:
279 SkXfermodeProc fProc; 275 SkXfermodeProc fProc;
280 276
281 typedef SkXfermode INHERITED; 277 typedef SkXfermode INHERITED;
282 }; 278 };
283 279
284 #endif 280 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698