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

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

Issue 377503004: Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref
Patch Set: Update YUV effect to reflect these changes. Created 6 years, 5 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 | « include/core/SkXfermode.h ('k') | include/effects/SkLumaColorFilter.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 2007 The Android Open Source Project 2 * Copyright 2007 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 SkColorMatrixFilter_DEFINED 8 #ifndef SkColorMatrixFilter_DEFINED
9 #define SkColorMatrixFilter_DEFINED 9 #define SkColorMatrixFilter_DEFINED
10 10
11 #include "SkColorFilter.h" 11 #include "SkColorFilter.h"
12 #include "SkColorMatrix.h" 12 #include "SkColorMatrix.h"
13 13
14 class SK_API SkColorMatrixFilter : public SkColorFilter { 14 class SK_API SkColorMatrixFilter : public SkColorFilter {
15 public: 15 public:
16 static SkColorMatrixFilter* Create(const SkColorMatrix& cm) { 16 static SkColorMatrixFilter* Create(const SkColorMatrix& cm) {
17 return SkNEW_ARGS(SkColorMatrixFilter, (cm)); 17 return SkNEW_ARGS(SkColorMatrixFilter, (cm));
18 } 18 }
19 static SkColorMatrixFilter* Create(const SkScalar array[20]) { 19 static SkColorMatrixFilter* Create(const SkScalar array[20]) {
20 return SkNEW_ARGS(SkColorMatrixFilter, (array)); 20 return SkNEW_ARGS(SkColorMatrixFilter, (array));
21 } 21 }
22 22
23 // overrides from SkColorFilter 23 // overrides from SkColorFilter
24 virtual void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const SK_OVERRIDE; 24 virtual void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const SK_OVERRIDE;
25 virtual void filterSpan16(const uint16_t src[], int count, uint16_t[]) const SK_OVERRIDE; 25 virtual void filterSpan16(const uint16_t src[], int count, uint16_t[]) const SK_OVERRIDE;
26 virtual uint32_t getFlags() const SK_OVERRIDE; 26 virtual uint32_t getFlags() const SK_OVERRIDE;
27 virtual bool asColorMatrix(SkScalar matrix[20]) const SK_OVERRIDE; 27 virtual bool asColorMatrix(SkScalar matrix[20]) const SK_OVERRIDE;
28 #if SK_SUPPORT_GPU 28 #if SK_SUPPORT_GPU
29 virtual GrEffectRef* asNewEffect(GrContext*) const SK_OVERRIDE; 29 virtual GrEffect* asNewEffect(GrContext*) const SK_OVERRIDE;
30 #endif 30 #endif
31 31
32 struct State { 32 struct State {
33 int32_t fArray[20]; 33 int32_t fArray[20];
34 int fShift; 34 int fShift;
35 }; 35 };
36 36
37 SK_TO_STRING_OVERRIDE() 37 SK_TO_STRING_OVERRIDE()
38 38
39 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorMatrixFilter) 39 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorMatrixFilter)
(...skipping 13 matching lines...) Expand all
53 Proc fProc; 53 Proc fProc;
54 State fState; 54 State fState;
55 uint32_t fFlags; 55 uint32_t fFlags;
56 56
57 void initState(const SkScalar array[20]); 57 void initState(const SkScalar array[20]);
58 58
59 typedef SkColorFilter INHERITED; 59 typedef SkColorFilter INHERITED;
60 }; 60 };
61 61
62 #endif 62 #endif
OLDNEW
« no previous file with comments | « include/core/SkXfermode.h ('k') | include/effects/SkLumaColorFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698