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

Side by Side Diff: include/effects/SkColorMatrixFilter.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: rebase 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
« no previous file with comments | « include/effects/SkColorFilterImageFilter.h ('k') | include/effects/SkComposeImageFilter.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
(...skipping 23 matching lines...) Expand all
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)
40 40
41 protected: 41 protected:
42 explicit SkColorMatrixFilter(const SkColorMatrix&); 42 explicit SkColorMatrixFilter(const SkColorMatrix&);
43 explicit SkColorMatrixFilter(const SkScalar array[20]); 43 explicit SkColorMatrixFilter(const SkScalar array[20]);
44 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
44 explicit SkColorMatrixFilter(SkReadBuffer& buffer); 45 explicit SkColorMatrixFilter(SkReadBuffer& buffer);
46 #endif
45 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 47 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
46 48
47 private: 49 private:
48 SkColorMatrix fMatrix; 50 SkColorMatrix fMatrix;
49 51
50 typedef void (*Proc)(const State&, unsigned r, unsigned g, unsigned b, 52 typedef void (*Proc)(const State&, unsigned r, unsigned g, unsigned b,
51 unsigned a, int32_t result[4]); 53 unsigned a, int32_t result[4]);
52 54
53 Proc fProc; 55 Proc fProc;
54 State fState; 56 State fState;
55 uint32_t fFlags; 57 uint32_t fFlags;
56 58
57 void initState(const SkScalar array[20]); 59 void initState(const SkScalar array[20]);
58 60
59 typedef SkColorFilter INHERITED; 61 typedef SkColorFilter INHERITED;
60 }; 62 };
61 63
62 #endif 64 #endif
OLDNEW
« no previous file with comments | « include/effects/SkColorFilterImageFilter.h ('k') | include/effects/SkComposeImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698