| 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 "SkPaint.h" | 8 #include "SkPaint.h" |
| 9 #include "SkAnnotation.h" | 9 #include "SkAnnotation.h" |
| 10 #include "SkAutoKern.h" | 10 #include "SkAutoKern.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 #ifdef SK_BUILD_FOR_ANDROID | 236 #ifdef SK_BUILD_FOR_ANDROID |
| 237 uint32_t SkPaint::getGenerationID() const { | 237 uint32_t SkPaint::getGenerationID() const { |
| 238 return fGenerationID; | 238 return fGenerationID; |
| 239 } | 239 } |
| 240 | 240 |
| 241 void SkPaint::setGenerationID(uint32_t generationID) { | 241 void SkPaint::setGenerationID(uint32_t generationID) { |
| 242 fGenerationID = generationID; | 242 fGenerationID = generationID; |
| 243 } | 243 } |
| 244 | 244 |
| 245 unsigned SkPaint::getBaseGlyphCount(SkUnichar text) const { | |
| 246 SkAutoGlyphCache autoCache(*this, NULL, NULL); | |
| 247 SkGlyphCache* cache = autoCache.getCache(); | |
| 248 return cache->getBaseGlyphCount(text); | |
| 249 } | |
| 250 | |
| 251 void SkPaint::setPaintOptionsAndroid(const SkPaintOptionsAndroid& options) { | 245 void SkPaint::setPaintOptionsAndroid(const SkPaintOptionsAndroid& options) { |
| 252 if (options != fPaintOptionsAndroid) { | 246 if (options != fPaintOptionsAndroid) { |
| 253 fPaintOptionsAndroid = options; | 247 fPaintOptionsAndroid = options; |
| 254 GEN_ID_INC; | 248 GEN_ID_INC; |
| 255 fDirtyBits |= kPaintOptionsAndroid_DirtyBit; | 249 fDirtyBits |= kPaintOptionsAndroid_DirtyBit; |
| 256 } | 250 } |
| 257 } | 251 } |
| 258 #endif | 252 #endif |
| 259 | 253 |
| 260 void SkPaint::setFilterLevel(FilterLevel level) { | 254 void SkPaint::setFilterLevel(FilterLevel level) { |
| (...skipping 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2740 } | 2734 } |
| 2741 #ifdef SK_BUILD_FOR_ANDROID | 2735 #ifdef SK_BUILD_FOR_ANDROID |
| 2742 if (dirty & kPaintOptionsAndroid_DirtyBit) { | 2736 if (dirty & kPaintOptionsAndroid_DirtyBit) { |
| 2743 SkPaintOptionsAndroid options; | 2737 SkPaintOptionsAndroid options; |
| 2744 options.unflatten(buffer); | 2738 options.unflatten(buffer); |
| 2745 paint->setPaintOptionsAndroid(options); | 2739 paint->setPaintOptionsAndroid(options); |
| 2746 } | 2740 } |
| 2747 #endif | 2741 #endif |
| 2748 SkASSERT(dirty == paint->fDirtyBits); | 2742 SkASSERT(dirty == paint->fDirtyBits); |
| 2749 } | 2743 } |
| OLD | NEW |