| 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 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1546 void SkScalerContext::MakeRec(const SkPaint& paint, | 1546 void SkScalerContext::MakeRec(const SkPaint& paint, |
| 1547 const SkDeviceProperties* deviceProperties, | 1547 const SkDeviceProperties* deviceProperties, |
| 1548 const SkMatrix* deviceMatrix, | 1548 const SkMatrix* deviceMatrix, |
| 1549 Rec* rec) { | 1549 Rec* rec) { |
| 1550 SkASSERT(deviceMatrix == NULL || !deviceMatrix->hasPerspective()); | 1550 SkASSERT(deviceMatrix == NULL || !deviceMatrix->hasPerspective()); |
| 1551 | 1551 |
| 1552 SkTypeface* typeface = paint.getTypeface(); | 1552 SkTypeface* typeface = paint.getTypeface(); |
| 1553 if (NULL == typeface) { | 1553 if (NULL == typeface) { |
| 1554 typeface = SkTypeface::GetDefaultTypeface(); | 1554 typeface = SkTypeface::GetDefaultTypeface(); |
| 1555 } | 1555 } |
| 1556 rec->fOrigFontID = typeface->uniqueID(); | 1556 rec->fFontID = typeface->uniqueID(); |
| 1557 rec->fFontID = rec->fOrigFontID; | |
| 1558 rec->fTextSize = paint.getTextSize(); | 1557 rec->fTextSize = paint.getTextSize(); |
| 1559 rec->fPreScaleX = paint.getTextScaleX(); | 1558 rec->fPreScaleX = paint.getTextScaleX(); |
| 1560 rec->fPreSkewX = paint.getTextSkewX(); | 1559 rec->fPreSkewX = paint.getTextSkewX(); |
| 1561 | 1560 |
| 1562 if (deviceMatrix) { | 1561 if (deviceMatrix) { |
| 1563 rec->fPost2x2[0][0] = sk_relax(deviceMatrix->getScaleX()); | 1562 rec->fPost2x2[0][0] = sk_relax(deviceMatrix->getScaleX()); |
| 1564 rec->fPost2x2[0][1] = sk_relax(deviceMatrix->getSkewX()); | 1563 rec->fPost2x2[0][1] = sk_relax(deviceMatrix->getSkewX()); |
| 1565 rec->fPost2x2[1][0] = sk_relax(deviceMatrix->getSkewY()); | 1564 rec->fPost2x2[1][0] = sk_relax(deviceMatrix->getSkewY()); |
| 1566 rec->fPost2x2[1][1] = sk_relax(deviceMatrix->getScaleY()); | 1565 rec->fPost2x2[1][1] = sk_relax(deviceMatrix->getScaleY()); |
| 1567 } else { | 1566 } else { |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2677 F_UNREF(Looper, readDrawLooper); | 2676 F_UNREF(Looper, readDrawLooper); |
| 2678 F_UNREF(ImageFilter, readImageFilter); | 2677 F_UNREF(ImageFilter, readImageFilter); |
| 2679 F(Typeface, readTypeface); | 2678 F(Typeface, readTypeface); |
| 2680 #undef F | 2679 #undef F |
| 2681 #undef F_UNREF | 2680 #undef F_UNREF |
| 2682 if (dirty & kAnnotation_DirtyBit) { | 2681 if (dirty & kAnnotation_DirtyBit) { |
| 2683 paint->setAnnotation(SkAnnotation::Create(buffer))->unref(); | 2682 paint->setAnnotation(SkAnnotation::Create(buffer))->unref(); |
| 2684 } | 2683 } |
| 2685 SkASSERT(dirty == paint->fDirtyBits); | 2684 SkASSERT(dirty == paint->fDirtyBits); |
| 2686 } | 2685 } |
| OLD | NEW |