| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 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 "SkTextBlob.h" | 8 #include "SkTextBlob.h" |
| 9 | 9 |
| 10 #include "SkReadBuffer.h" | 10 #include "SkReadBuffer.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 SkPaint::kGenA8FromLCD_Flag; | 66 SkPaint::kGenA8FromLCD_Flag; |
| 67 | 67 |
| 68 SkScalar fSize; | 68 SkScalar fSize; |
| 69 SkScalar fScaleX; | 69 SkScalar fScaleX; |
| 70 | 70 |
| 71 // Keep this SkAutoTUnref off the first position, to avoid interfering with
SkNoncopyable | 71 // Keep this SkAutoTUnref off the first position, to avoid interfering with
SkNoncopyable |
| 72 // empty baseclass optimization (http://code.google.com/p/skia/issues/detail
?id=3694). | 72 // empty baseclass optimization (http://code.google.com/p/skia/issues/detail
?id=3694). |
| 73 SkAutoTUnref<SkTypeface> fTypeface; | 73 SkAutoTUnref<SkTypeface> fTypeface; |
| 74 SkScalar fSkewX; | 74 SkScalar fSkewX; |
| 75 | 75 |
| 76 SK_COMPILE_ASSERT(SkPaint::kFull_Hinting < 4, insufficient_hinting_bits); | 76 static_assert(SkPaint::kFull_Hinting < 4, "insufficient_hinting_bits"); |
| 77 uint32_t fHinting : 2; | 77 uint32_t fHinting : 2; |
| 78 SK_COMPILE_ASSERT((kFlagsMask & 0xffff) == kFlagsMask, insufficient_flags_bi
ts); | 78 static_assert((kFlagsMask & 0xffff) == kFlagsMask, "insufficient_flags_bits"
); |
| 79 uint32_t fFlags : 16; | 79 uint32_t fFlags : 16; |
| 80 | 80 |
| 81 typedef SkNoncopyable INHERITED; | 81 typedef SkNoncopyable INHERITED; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 struct RunFontStorageEquivalent { | 84 struct RunFontStorageEquivalent { |
| 85 SkScalar fSize, fScaleX; | 85 SkScalar fSize, fScaleX; |
| 86 void* fTypeface; | 86 void* fTypeface; |
| 87 SkScalar fSkewX; | 87 SkScalar fSkewX; |
| 88 uint32_t fFlags; | 88 uint32_t fFlags; |
| 89 }; | 89 }; |
| 90 SK_COMPILE_ASSERT(sizeof(RunFont) == sizeof(RunFontStorageEquivalent), runfont_s
hould_stay_packed); | 90 static_assert(sizeof(RunFont) == sizeof(RunFontStorageEquivalent), "runfont_shou
ld_stay_packed"); |
| 91 | 91 |
| 92 } // anonymous namespace | 92 } // anonymous namespace |
| 93 | 93 |
| 94 // | 94 // |
| 95 // Textblob data is laid out into externally-managed storage as follows: | 95 // Textblob data is laid out into externally-managed storage as follows: |
| 96 // | 96 // |
| 97 // --------------------------------------------------------------------------
--- | 97 // --------------------------------------------------------------------------
--- |
| 98 // | SkTextBlob | RunRecord | Glyphs[] | Pos[] | RunRecord | Glyphs[] | Pos[]
| ... | 98 // | SkTextBlob | RunRecord | Glyphs[] | Pos[] | RunRecord | Glyphs[] | Pos[]
| ... |
| 99 // --------------------------------------------------------------------------
--- | 99 // --------------------------------------------------------------------------
--- |
| 100 // | 100 // |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 | 600 |
| 601 fStorageUsed = 0; | 601 fStorageUsed = 0; |
| 602 fStorageSize = 0; | 602 fStorageSize = 0; |
| 603 fRunCount = 0; | 603 fRunCount = 0; |
| 604 fLastRun = 0; | 604 fLastRun = 0; |
| 605 fBounds.setEmpty(); | 605 fBounds.setEmpty(); |
| 606 | 606 |
| 607 return blob; | 607 return blob; |
| 608 } | 608 } |
| 609 | 609 |
| OLD | NEW |