OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkPixelXorXfermode.h" | 8 #include "SkPixelXorXfermode.h" |
| 9 |
| 10 #if SK_INCLUDE_DEPRECATED_XFERMODES |
| 11 |
9 #include "SkColorPriv.h" | 12 #include "SkColorPriv.h" |
10 #include "SkReadBuffer.h" | 13 #include "SkReadBuffer.h" |
11 #include "SkWriteBuffer.h" | 14 #include "SkWriteBuffer.h" |
12 #include "SkString.h" | 15 #include "SkString.h" |
13 #include "SkValue.h" | 16 #include "SkValue.h" |
14 #include "SkValueKeys.h" | 17 #include "SkValueKeys.h" |
15 | 18 |
16 // we always return an opaque color, 'cause I don't know what to do with | 19 // we always return an opaque color, 'cause I don't know what to do with |
17 // the alpha-component and still return a valid premultiplied color. | 20 // the alpha-component and still return a valid premultiplied color. |
18 SkPMColor SkPixelXorXfermode::xferColor(SkPMColor src, SkPMColor dst) const { | 21 SkPMColor SkPixelXorXfermode::xferColor(SkPMColor src, SkPMColor dst) const { |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 } | 391 } |
389 | 392 |
390 #endif | 393 #endif |
391 | 394 |
392 SkValue SkPixelXorXfermode::asValue() const { | 395 SkValue SkPixelXorXfermode::asValue() const { |
393 auto value = SkValue::Object(SkValue::PixelXorXfermode); | 396 auto value = SkValue::Object(SkValue::PixelXorXfermode); |
394 value.set(SkValueKeys::PixelXorXfermode::kOpColor, | 397 value.set(SkValueKeys::PixelXorXfermode::kOpColor, |
395 SkValue::FromU32(SkToU32(fOpColor))); | 398 SkValue::FromU32(SkToU32(fOpColor))); |
396 return value; | 399 return value; |
397 } | 400 } |
| 401 |
| 402 #endif |
OLD | NEW |