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

Side by Side Diff: src/effects/SkArithmeticMode.cpp

Issue 769953002: Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « src/effects/SkAlphaThresholdFilter.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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 #include "SkArithmeticMode.h" 8 #include "SkArithmeticMode.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 private: 43 private:
44 SkArithmeticMode_scalar(SkScalar k1, SkScalar k2, SkScalar k3, SkScalar k4, bool enforcePMColor) { 44 SkArithmeticMode_scalar(SkScalar k1, SkScalar k2, SkScalar k3, SkScalar k4, bool enforcePMColor) {
45 fK[0] = k1; 45 fK[0] = k1;
46 fK[1] = k2; 46 fK[1] = k2;
47 fK[2] = k3; 47 fK[2] = k3;
48 fK[3] = k4; 48 fK[3] = k4;
49 fEnforcePMColor = enforcePMColor; 49 fEnforcePMColor = enforcePMColor;
50 } 50 }
51 51
52 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
53 SkArithmeticMode_scalar(SkReadBuffer& buffer) : INHERITED(buffer) {
54 fK[0] = buffer.readScalar();
55 fK[1] = buffer.readScalar();
56 fK[2] = buffer.readScalar();
57 fK[3] = buffer.readScalar();
58 fEnforcePMColor = buffer.readBool();
59 }
60 #endif
61
62 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { 52 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE {
63 buffer.writeScalar(fK[0]); 53 buffer.writeScalar(fK[0]);
64 buffer.writeScalar(fK[1]); 54 buffer.writeScalar(fK[1]);
65 buffer.writeScalar(fK[2]); 55 buffer.writeScalar(fK[2]);
66 buffer.writeScalar(fK[3]); 56 buffer.writeScalar(fK[3]);
67 buffer.writeBool(fEnforcePMColor); 57 buffer.writeBool(fEnforcePMColor);
68 } 58 }
69 SkScalar fK[4]; 59 SkScalar fK[4];
70 bool fEnforcePMColor; 60 bool fEnforcePMColor;
71 61
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 background); 440 background);
451 } 441 }
452 return true; 442 return true;
453 } 443 }
454 444
455 #endif 445 #endif
456 446
457 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) 447 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode)
458 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) 448 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar)
459 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 449 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkAvoidXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698