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 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2171 this->setTextEncoding(static_cast<SkPaint::TextEncoding>(buffer.readUInt
())); | 2171 this->setTextEncoding(static_cast<SkPaint::TextEncoding>(buffer.readUInt
())); |
2172 } | 2172 } |
2173 | 2173 |
2174 if (flatFlags & kHasTypeface_FlatFlag) { | 2174 if (flatFlags & kHasTypeface_FlatFlag) { |
2175 this->setTypeface(buffer.readTypeface()); | 2175 this->setTypeface(buffer.readTypeface()); |
2176 } else { | 2176 } else { |
2177 this->setTypeface(NULL); | 2177 this->setTypeface(NULL); |
2178 } | 2178 } |
2179 | 2179 |
2180 if (flatFlags & kHasEffects_FlatFlag) { | 2180 if (flatFlags & kHasEffects_FlatFlag) { |
2181 SkSafeUnref(this->setPathEffect(buffer.readFlattenableT<SkPathEffect>())
); | 2181 SkSafeUnref(this->setPathEffect(buffer.readPathEffect())); |
2182 SkSafeUnref(this->setShader(buffer.readFlattenableT<SkShader>())); | 2182 SkSafeUnref(this->setShader(buffer.readShader())); |
2183 SkSafeUnref(this->setXfermode(buffer.readFlattenableT<SkXfermode>())); | 2183 SkSafeUnref(this->setXfermode(buffer.readXfermode())); |
2184 SkSafeUnref(this->setMaskFilter(buffer.readFlattenableT<SkMaskFilter>())
); | 2184 SkSafeUnref(this->setMaskFilter(buffer.readMaskFilter())); |
2185 SkSafeUnref(this->setColorFilter(buffer.readFlattenableT<SkColorFilter>(
))); | 2185 SkSafeUnref(this->setColorFilter(buffer.readColorFilter())); |
2186 SkSafeUnref(this->setRasterizer(buffer.readFlattenableT<SkRasterizer>())
); | 2186 SkSafeUnref(this->setRasterizer(buffer.readRasterizer())); |
2187 SkSafeUnref(this->setLooper(buffer.readFlattenableT<SkDrawLooper>())); | 2187 SkSafeUnref(this->setLooper(buffer.readDrawLooper())); |
2188 SkSafeUnref(this->setImageFilter(buffer.readFlattenableT<SkImageFilter>(
))); | 2188 SkSafeUnref(this->setImageFilter(buffer.readImageFilter())); |
2189 | 2189 |
2190 if (buffer.readBool()) { | 2190 if (buffer.readBool()) { |
2191 this->setAnnotation(SkNEW_ARGS(SkAnnotation, (buffer)))->unref(); | 2191 this->setAnnotation(SkNEW_ARGS(SkAnnotation, (buffer)))->unref(); |
2192 } | 2192 } |
2193 } else { | 2193 } else { |
2194 this->setPathEffect(NULL); | 2194 this->setPathEffect(NULL); |
2195 this->setShader(NULL); | 2195 this->setShader(NULL); |
2196 this->setXfermode(NULL); | 2196 this->setXfermode(NULL); |
2197 this->setMaskFilter(NULL); | 2197 this->setMaskFilter(NULL); |
2198 this->setColorFilter(NULL); | 2198 this->setColorFilter(NULL); |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2604 case SkXfermode::kPlus_Mode: | 2604 case SkXfermode::kPlus_Mode: |
2605 return 0 == this->getAlpha(); | 2605 return 0 == this->getAlpha(); |
2606 case SkXfermode::kDst_Mode: | 2606 case SkXfermode::kDst_Mode: |
2607 return true; | 2607 return true; |
2608 default: | 2608 default: |
2609 break; | 2609 break; |
2610 } | 2610 } |
2611 } | 2611 } |
2612 return false; | 2612 return false; |
2613 } | 2613 } |
OLD | NEW |