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

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

Issue 23644006: ARM Skia NEON patches - 28 - Xfermode: SIMD modeprocs (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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
11 #define SkXfermode_DEFINED 11 #define SkXfermode_DEFINED
12 12
13 #include "SkFlattenable.h" 13 #include "SkFlattenable.h"
14 #include "SkColor.h" 14 #include "SkColor.h"
15 #include "SkXfermode_opts.h"
djsollen 2013/10/03 16:38:29 we shouldn't have private headers exposed in our p
15 16
16 class GrContext; 17 class GrContext;
17 class GrEffectRef; 18 class GrEffectRef;
18 class GrTexture; 19 class GrTexture;
19 class SkString; 20 class SkString;
20 21
21 /** \class SkXfermode 22 /** \class SkXfermode
22 23
23 SkXfermode is the base class for objects that are called to implement custom 24 SkXfermode is the base class for objects that are called to implement custom
24 "transfer-modes" in the drawing pipeline. The static function Create(Modes) 25 "transfer-modes" in the drawing pipeline. The static function Create(Modes)
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 243
243 /////////////////////////////////////////////////////////////////////////////// 244 ///////////////////////////////////////////////////////////////////////////////
244 245
245 /** \class SkProcXfermode 246 /** \class SkProcXfermode
246 247
247 SkProcXfermode is a xfermode that applies the specified proc to its colors. 248 SkProcXfermode is a xfermode that applies the specified proc to its colors.
248 This class is not exported to java. 249 This class is not exported to java.
249 */ 250 */
250 class SkProcXfermode : public SkXfermode { 251 class SkProcXfermode : public SkXfermode {
251 public: 252 public:
252 SkProcXfermode(SkXfermodeProc proc) : fProc(proc) {} 253 SkProcXfermode(SkXfermodeProc proc) : fProc(proc), fProcSIMD(NULL) {}
254 SkProcXfermode(SkXfermodeProc proc, SkXfermodeProcSIMD procSIMD) :
255 fProc(proc), fProcSIMD(procSIMD) {}
253 256
254 // overrides from SkXfermode 257 // overrides from SkXfermode
255 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, 258 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count,
256 const SkAlpha aa[]) const SK_OVERRIDE; 259 const SkAlpha aa[]) const SK_OVERRIDE;
257 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, 260 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count,
258 const SkAlpha aa[]) const SK_OVERRIDE; 261 const SkAlpha aa[]) const SK_OVERRIDE;
259 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, 262 virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count,
260 const SkAlpha aa[]) const SK_OVERRIDE; 263 const SkAlpha aa[]) const SK_OVERRIDE;
261 264
262 SK_DEVELOPER_TO_STRING() 265 SK_DEVELOPER_TO_STRING()
263 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcXfermode) 266 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcXfermode)
264 267
265 protected: 268 protected:
266 SkProcXfermode(SkFlattenableReadBuffer&); 269 SkProcXfermode(SkFlattenableReadBuffer&);
267 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 270 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
268 271
269 // allow subclasses to update this after we unflatten 272 // allow subclasses to update this after we unflatten
270 void setProc(SkXfermodeProc proc) { 273 void setProcs(SkXfermodeProc proc, SkXfermodeProcSIMD procSIMD) {
271 fProc = proc; 274 fProc = proc;
275 fProcSIMD = procSIMD;
272 } 276 }
273 277
274 private: 278 private:
275 SkXfermodeProc fProc; 279 SkXfermodeProc fProc;
280 SkXfermodeProcSIMD fProcSIMD;
djsollen 2013/10/03 16:38:29 I don't think we should expose this here. My init
276 281
277 typedef SkXfermode INHERITED; 282 typedef SkXfermode INHERITED;
278 }; 283 };
279 284
280 #endif 285 #endif
OLDNEW
« no previous file with comments | « gyp/views_animated.gyp ('k') | src/core/SkXfermode.cpp » ('j') | src/core/SkXfermode.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698