OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "SkPaint.h" | 9 #include "SkPaint.h" |
10 #include "SkAnnotation.h" | 10 #include "SkAnnotation.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 } | 300 } |
301 | 301 |
302 void SkPaint::setFakeBoldText(bool doFakeBold) { | 302 void SkPaint::setFakeBoldText(bool doFakeBold) { |
303 this->setFlags(SkSetClearMask(fFlags, doFakeBold, kFakeBoldText_Flag)); | 303 this->setFlags(SkSetClearMask(fFlags, doFakeBold, kFakeBoldText_Flag)); |
304 } | 304 } |
305 | 305 |
306 void SkPaint::setDevKernText(bool doDevKern) { | 306 void SkPaint::setDevKernText(bool doDevKern) { |
307 this->setFlags(SkSetClearMask(fFlags, doDevKern, kDevKernText_Flag)); | 307 this->setFlags(SkSetClearMask(fFlags, doDevKern, kDevKernText_Flag)); |
308 } | 308 } |
309 | 309 |
| 310 void SkPaint::setDistanceFieldTextTEMP(bool doDistanceFieldText) { |
| 311 this->setFlags(SkSetClearMask(fFlags, doDistanceFieldText, kDistanceFieldTex
tTEMP_Flag)); |
| 312 } |
| 313 |
310 void SkPaint::setStyle(Style style) { | 314 void SkPaint::setStyle(Style style) { |
311 if ((unsigned)style < kStyleCount) { | 315 if ((unsigned)style < kStyleCount) { |
312 GEN_ID_INC_EVAL((unsigned)style != fStyle); | 316 GEN_ID_INC_EVAL((unsigned)style != fStyle); |
313 fStyle = style; | 317 fStyle = style; |
314 fDirtyBits |= kBitfields_DirtyBit; | 318 fDirtyBits |= kBitfields_DirtyBit; |
315 } else { | 319 } else { |
316 #ifdef SK_REPORT_API_RANGE_CHECK | 320 #ifdef SK_REPORT_API_RANGE_CHECK |
317 SkDebugf("SkPaint::setStyle(%d) out of range\n", style); | 321 SkDebugf("SkPaint::setStyle(%d) out of range\n", style); |
318 #endif | 322 #endif |
319 } | 323 } |
(...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2654 } | 2658 } |
2655 #ifdef SK_BUILD_FOR_ANDROID | 2659 #ifdef SK_BUILD_FOR_ANDROID |
2656 if (dirty & kPaintOptionsAndroid_DirtyBit) { | 2660 if (dirty & kPaintOptionsAndroid_DirtyBit) { |
2657 SkPaintOptionsAndroid options; | 2661 SkPaintOptionsAndroid options; |
2658 options.unflatten(buffer); | 2662 options.unflatten(buffer); |
2659 paint->setPaintOptionsAndroid(options); | 2663 paint->setPaintOptionsAndroid(options); |
2660 } | 2664 } |
2661 #endif | 2665 #endif |
2662 SkASSERT(dirty == paint->fDirtyBits); | 2666 SkASSERT(dirty == paint->fDirtyBits); |
2663 } | 2667 } |
OLD | NEW |