| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef GrAtlasTextBlob_DEFINED | 8 #ifndef GrAtlasTextBlob_DEFINED |
| 9 #define GrAtlasTextBlob_DEFINED | 9 #define GrAtlasTextBlob_DEFINED |
| 10 | 10 |
| 11 #include "GrBatchAtlas.h" | 11 #include "GrBatchAtlas.h" |
| 12 #include "GrBatchFontCache.h" | 12 #include "GrBatchFontCache.h" |
| 13 #include "GrColor.h" | 13 #include "GrColor.h" |
| 14 #include "GrMemoryPool.h" | 14 #include "GrMemoryPool.h" |
| 15 #include "SkDescriptor.h" | 15 #include "SkDescriptor.h" |
| 16 #include "SkMaskFilter.h" | 16 #include "SkMaskFilter.h" |
| 17 #include "SkPathEffect.h" |
| 18 #include "SkRasterizer.h" |
| 17 #include "SkSurfaceProps.h" | 19 #include "SkSurfaceProps.h" |
| 18 #include "SkTInternalLList.h" | 20 #include "SkTInternalLList.h" |
| 19 | 21 |
| 20 class GrBlobRegenHelper; | 22 class GrBlobRegenHelper; |
| 21 struct GrDistanceFieldAdjustTable; | 23 struct GrDistanceFieldAdjustTable; |
| 22 class GrMemoryPool; | 24 class GrMemoryPool; |
| 23 class SkDrawFilter; | 25 class SkDrawFilter; |
| 24 class SkTextBlob; | 26 class SkTextBlob; |
| 25 class SkTextBlobRunIterator; | 27 class SkTextBlobRunIterator; |
| 26 | 28 |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 SubRunInfo& newSubRun = fSubRunInfo.push_back(); | 472 SubRunInfo& newSubRun = fSubRunInfo.push_back(); |
| 471 const SubRunInfo& prevSubRun = fSubRunInfo.fromBack(1); | 473 const SubRunInfo& prevSubRun = fSubRunInfo.fromBack(1); |
| 472 | 474 |
| 473 newSubRun.setAsSuccessor(prevSubRun); | 475 newSubRun.setAsSuccessor(prevSubRun); |
| 474 return newSubRun; | 476 return newSubRun; |
| 475 } | 477 } |
| 476 static const int kMinSubRuns = 1; | 478 static const int kMinSubRuns = 1; |
| 477 SkAutoTUnref<SkTypeface> fTypeface; | 479 SkAutoTUnref<SkTypeface> fTypeface; |
| 478 SkSTArray<kMinSubRuns, SubRunInfo> fSubRunInfo; | 480 SkSTArray<kMinSubRuns, SubRunInfo> fSubRunInfo; |
| 479 SkAutoDescriptor fDescriptor; | 481 SkAutoDescriptor fDescriptor; |
| 480 SkScalerContextEffects fEffects; | 482 |
| 483 // Effects from the paint that are used to build a SkScalerContext. |
| 484 sk_sp<SkPathEffect> fPathEffect; |
| 485 sk_sp<SkRasterizer> fRasterizer; |
| 486 sk_sp<SkMaskFilter> fMaskFilter; |
| 481 | 487 |
| 482 // Distance field text cannot draw coloremoji, and so has to fall back.
However, | 488 // Distance field text cannot draw coloremoji, and so has to fall back.
However, |
| 483 // though the distance field text and the coloremoji may share the same
run, they | 489 // though the distance field text and the coloremoji may share the same
run, they |
| 484 // will have different descriptors. If fOverrideDescriptor is non-nullp
tr, then it | 490 // will have different descriptors. If fOverrideDescriptor is non-nullp
tr, then it |
| 485 // will be used in place of the run's descriptor to regen texture coords | 491 // will be used in place of the run's descriptor to regen texture coords |
| 486 SkAutoTDelete<SkAutoDescriptor> fOverrideDescriptor; // df properties | 492 SkAutoTDelete<SkAutoDescriptor> fOverrideDescriptor; // df properties |
| 487 bool fInitialized; | 493 bool fInitialized; |
| 488 bool fDrawAsPaths; | 494 bool fDrawAsPaths; |
| 489 }; | 495 }; |
| 490 | 496 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 // We can reuse distance field text, but only if the new viewmatrix would no
t result in | 557 // We can reuse distance field text, but only if the new viewmatrix would no
t result in |
| 552 // a mip change. Because there can be multiple runs in a blob, we track the
overall | 558 // a mip change. Because there can be multiple runs in a blob, we track the
overall |
| 553 // maximum minimum scale, and minimum maximum scale, we can support before w
e need to regen | 559 // maximum minimum scale, and minimum maximum scale, we can support before w
e need to regen |
| 554 SkScalar fMaxMinScale; | 560 SkScalar fMaxMinScale; |
| 555 SkScalar fMinMaxScale; | 561 SkScalar fMinMaxScale; |
| 556 int fRunCount; | 562 int fRunCount; |
| 557 uint8_t fTextType; | 563 uint8_t fTextType; |
| 558 }; | 564 }; |
| 559 | 565 |
| 560 #endif | 566 #endif |
| OLD | NEW |