| 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 | 16 |
| 14 // we always return an opaque color, 'cause I don't know what to do with | 17 // we always return an opaque color, 'cause I don't know what to do with |
| 15 // the alpha-component and still return a valid premultiplied color. | 18 // the alpha-component and still return a valid premultiplied color. |
| 16 SkPMColor SkPixelXorXfermode::xferColor(SkPMColor src, SkPMColor dst) const { | 19 SkPMColor SkPixelXorXfermode::xferColor(SkPMColor src, SkPMColor dst) const { |
| 17 SkPMColor res = src ^ dst ^ fOpColor; | 20 SkPMColor res = src ^ dst ^ fOpColor; |
| 18 | 21 |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 } | 382 } |
| 380 | 383 |
| 381 bool SkPixelXorXfermode::asXPFactory(GrXPFactory** xpf) const { | 384 bool SkPixelXorXfermode::asXPFactory(GrXPFactory** xpf) const { |
| 382 if (xpf) { | 385 if (xpf) { |
| 383 *xpf = GrPixelXorXPFactory::Create(fOpColor); | 386 *xpf = GrPixelXorXPFactory::Create(fOpColor); |
| 384 } | 387 } |
| 385 return true; | 388 return true; |
| 386 } | 389 } |
| 387 | 390 |
| 388 #endif | 391 #endif |
| 392 |
| 393 #endif |
| OLD | NEW |