| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 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 #include "SkAvoidXfermode.h" | 8 #include "SkAvoidXfermode.h" |
| 9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
| 10 #include "SkReadBuffer.h" | 10 #include "SkReadBuffer.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 dst[i] = SkBlend3216(src[i], dst[i], d); | 160 dst[i] = SkBlend3216(src[i], dst[i], d); |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 | 164 |
| 165 void SkAvoidXfermode::xferA8(SkAlpha dst[], const SkPMColor src[], int count, | 165 void SkAvoidXfermode::xferA8(SkAlpha dst[], const SkPMColor src[], int count, |
| 166 const SkAlpha aa[]) const { | 166 const SkAlpha aa[]) const { |
| 167 // override in subclass | 167 // override in subclass |
| 168 } | 168 } |
| 169 | 169 |
| 170 #ifdef SK_DEVELOPER | 170 #ifndef SK_IGNORE_TO_STRING |
| 171 void SkAvoidXfermode::toString(SkString* str) const { | 171 void SkAvoidXfermode::toString(SkString* str) const { |
| 172 str->append("SkAvoidXfermode: opColor: "); | 172 str->append("SkAvoidXfermode: opColor: "); |
| 173 str->appendHex(fOpColor); | 173 str->appendHex(fOpColor); |
| 174 str->appendf("distMul: %d ", fDistMul); | 174 str->appendf("distMul: %d ", fDistMul); |
| 175 | 175 |
| 176 static const char* gModeStrings[] = { "Avoid", "Target" }; | 176 static const char* gModeStrings[] = { "Avoid", "Target" }; |
| 177 | 177 |
| 178 str->appendf("mode: %s", gModeStrings[fMode]); | 178 str->appendf("mode: %s", gModeStrings[fMode]); |
| 179 } | 179 } |
| 180 #endif | 180 #endif |
| OLD | NEW |