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 #include "GrAtlasTextContext.h" | 7 #include "GrAtlasTextContext.h" |
8 | 8 |
9 #include "GrBatchFontCache.h" | 9 #include "GrBatchFontCache.h" |
10 #include "GrBatchTarget.h" | 10 #include "GrBatchTarget.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
235 for (; !it.done(); it.next()) { | 235 for (; !it.done(); it.next()) { |
236 if (it.isLCD()) { | 236 if (it.isLCD()) { |
237 return true; | 237 return true; |
238 } | 238 } |
239 } | 239 } |
240 return false; | 240 return false; |
241 } | 241 } |
242 | 242 |
243 bool GrAtlasTextContext::MustRegenerateBlob(SkScalar* outTransX, SkScalar* outTr ansY, | 243 bool GrAtlasTextContext::MustRegenerateBlob(SkScalar* outTransX, SkScalar* outTr ansY, |
244 const GrAtlasTextBlob& blob, const S kPaint& paint, | 244 const GrAtlasTextBlob& blob, const S kPaint& paint, |
245 const SkMaskFilter::BlurRec& blurRec , | 245 GrColor color, const SkMaskFilter::B lurRec& blurRec, |
246 const SkMatrix& viewMatrix, SkScalar x, SkScalar y) { | 246 const SkMatrix& viewMatrix, SkScalar x, SkScalar y) { |
247 // If we have LCD text then our canonical color will be set to transparent, in this case we have | 247 // If we have LCD text then our canonical color will be set to transparent, in this case we have |
248 // to regenerate the blob on any color change | 248 // to regenerate the blob on any color change |
249 if (blob.fKey.fCanonicalColor == SK_ColorTRANSPARENT && blob.fPaintColor != paint.getColor()) { | 249 // We use the grPaint to get any color filter effects |
250 if (blob.fKey.fCanonicalColor == SK_ColorTRANSPARENT && | |
251 blob.fPaintColor != color) { | |
250 return true; | 252 return true; |
251 } | 253 } |
252 | 254 |
253 if (blob.fViewMatrix.hasPerspective() != viewMatrix.hasPerspective()) { | 255 if (blob.fViewMatrix.hasPerspective() != viewMatrix.hasPerspective()) { |
254 return true; | 256 return true; |
255 } | 257 } |
256 | 258 |
257 if (blob.fViewMatrix.hasPerspective() && !blob.fViewMatrix.cheapEqualTo(view Matrix)) { | 259 if (blob.fViewMatrix.hasPerspective() && !blob.fViewMatrix.cheapEqualTo(view Matrix)) { |
258 return true; | 260 return true; |
259 } | 261 } |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
388 SkScalar transY = 0.f; | 390 SkScalar transY = 0.f; |
389 | 391 |
390 // Though for the time being runs in the textblob can override the paint, th ey only touch font | 392 // Though for the time being runs in the textblob can override the paint, th ey only touch font |
391 // info. | 393 // info. |
392 GrPaint grPaint; | 394 GrPaint grPaint; |
393 if (!SkPaint2GrPaint(fContext, rt, skPaint, viewMatrix, true, &grPaint)) { | 395 if (!SkPaint2GrPaint(fContext, rt, skPaint, viewMatrix, true, &grPaint)) { |
394 return; | 396 return; |
395 } | 397 } |
396 | 398 |
397 if (cacheBlob) { | 399 if (cacheBlob) { |
398 if (MustRegenerateBlob(&transX, &transY, *cacheBlob, skPaint, blurRec, v iewMatrix, x, y)) { | 400 if (MustRegenerateBlob(&transX, &transY, *cacheBlob, skPaint, grPaint.ge tColor(), blurRec, |
401 viewMatrix, x, y)) { | |
399 // We have to remake the blob because changes may invalidate our mas ks. | 402 // We have to remake the blob because changes may invalidate our mas ks. |
400 // TODO we could probably get away reuse most of the time if the poi nter is unique, | 403 // TODO we could probably get away reuse most of the time if the poi nter is unique, |
401 // but we'd have to clear the subrun information | 404 // but we'd have to clear the subrun information |
402 fCache->remove(cacheBlob); | 405 fCache->remove(cacheBlob); |
403 cacheBlob.reset(SkRef(fCache->createCachedBlob(blob, key, blurRec, s kPaint, | 406 cacheBlob.reset(SkRef(fCache->createCachedBlob(blob, key, blurRec, s kPaint, |
404 kGrayTextVASize))); | 407 kGrayTextVASize))); |
405 this->regenerateTextBlob(cacheBlob, skPaint, grPaint.getColor(), vie wMatrix, | 408 this->regenerateTextBlob(cacheBlob, skPaint, grPaint.getColor(), vie wMatrix, |
406 blob, x, y, drawFilter, clipRect, rt, clip, grPaint); | 409 blob, x, y, drawFilter, clipRect, rt, clip) ; |
407 } else { | 410 } else { |
408 // If we can reuse the blob, then make sure we update the blob's vie wmatrix, and x/y | 411 // If we can reuse the blob, then make sure we update the blob's vie wmatrix, and x/y |
409 // offsets. Note, we offset the vertex bounds right before flushing | 412 // offsets. Note, we offset the vertex bounds right before flushing |
410 cacheBlob->fViewMatrix = viewMatrix; | 413 cacheBlob->fViewMatrix = viewMatrix; |
411 cacheBlob->fX = x; | 414 cacheBlob->fX = x; |
412 cacheBlob->fY = y; | 415 cacheBlob->fY = y; |
413 fCache->makeMRU(cacheBlob); | 416 fCache->makeMRU(cacheBlob); |
414 #ifdef CACHE_SANITY_CHECK | 417 #ifdef CACHE_SANITY_CHECK |
415 { | 418 { |
416 int glyphCount = 0; | 419 int glyphCount = 0; |
417 int runCount = 0; | 420 int runCount = 0; |
418 GrTextBlobCache::BlobGlyphCount(&glyphCount, &runCount, blob); | 421 GrTextBlobCache::BlobGlyphCount(&glyphCount, &runCount, blob); |
419 SkAutoTUnref<GrAtlasTextBlob> sanityBlob(fCache->createBlob(glyp hCount, runCount, | 422 SkAutoTUnref<GrAtlasTextBlob> sanityBlob(fCache->createBlob(glyp hCount, runCount, |
420 kGra yTextVASize)); | 423 kGra yTextVASize)); |
421 GrTextBlobCache::SetupCacheBlobKey(sanityBlob, key, blurRec, skP aint); | 424 GrTextBlobCache::SetupCacheBlobKey(sanityBlob, key, blurRec, skP aint); |
422 this->regenerateTextBlob(sanityBlob, skPaint, grPaint.getColor() , viewMatrix, | 425 this->regenerateTextBlob(sanityBlob, skPaint, grPaint.getColor() , viewMatrix, |
423 blob, x, y, drawFilter, clipRect, rt, c lip, grPaint); | 426 blob, x, y, drawFilter, clipRect, rt, c lip); |
424 GrAtlasTextBlob::AssertEqual(*sanityBlob, *cacheBlob); | 427 GrAtlasTextBlob::AssertEqual(*sanityBlob, *cacheBlob); |
425 } | 428 } |
426 | 429 |
427 #endif | 430 #endif |
428 } | 431 } |
429 } else { | 432 } else { |
430 if (canCache) { | 433 if (canCache) { |
431 cacheBlob.reset(SkRef(fCache->createCachedBlob(blob, key, blurRec, s kPaint, | 434 cacheBlob.reset(SkRef(fCache->createCachedBlob(blob, key, blurRec, s kPaint, |
432 kGrayTextVASize))); | 435 kGrayTextVASize))); |
433 } else { | 436 } else { |
434 cacheBlob.reset(fCache->createBlob(blob, kGrayTextVASize)); | 437 cacheBlob.reset(fCache->createBlob(blob, kGrayTextVASize)); |
435 } | 438 } |
436 this->regenerateTextBlob(cacheBlob, skPaint, grPaint.getColor(), viewMat rix, | 439 this->regenerateTextBlob(cacheBlob, skPaint, grPaint.getColor(), viewMat rix, |
437 blob, x, y, drawFilter, clipRect, rt, clip, grP aint); | 440 blob, x, y, drawFilter, clipRect, rt, clip); |
438 } | 441 } |
439 | 442 |
440 this->flush(blob, cacheBlob, rt, skPaint, grPaint, drawFilter, | 443 this->flush(blob, cacheBlob, rt, skPaint, grPaint, drawFilter, |
441 clip, viewMatrix, clipBounds, x, y, transX, transY); | 444 clip, viewMatrix, clipBounds, x, y, transX, transY); |
442 } | 445 } |
443 | 446 |
444 inline bool GrAtlasTextContext::canDrawAsDistanceFields(const SkPaint& skPaint, | 447 inline bool GrAtlasTextContext::canDrawAsDistanceFields(const SkPaint& skPaint, |
445 const SkMatrix& viewMatr ix) { | 448 const SkMatrix& viewMatr ix) { |
446 // TODO: support perspective (need getMaxScale replacement) | 449 // TODO: support perspective (need getMaxScale replacement) |
447 if (viewMatrix.hasPerspective()) { | 450 if (viewMatrix.hasPerspective()) { |
(...skipping 30 matching lines...) Expand all Loading... | |
478 } | 481 } |
479 | 482 |
480 return true; | 483 return true; |
481 } | 484 } |
482 | 485 |
483 void GrAtlasTextContext::regenerateTextBlob(GrAtlasTextBlob* cacheBlob, | 486 void GrAtlasTextContext::regenerateTextBlob(GrAtlasTextBlob* cacheBlob, |
484 const SkPaint& skPaint, GrColor colo r, | 487 const SkPaint& skPaint, GrColor colo r, |
485 const SkMatrix& viewMatrix, | 488 const SkMatrix& viewMatrix, |
486 const SkTextBlob* blob, SkScalar x, SkScalar y, | 489 const SkTextBlob* blob, SkScalar x, SkScalar y, |
487 SkDrawFilter* drawFilter, const SkIR ect& clipRect, | 490 SkDrawFilter* drawFilter, const SkIR ect& clipRect, |
488 GrRenderTarget* rt, const GrClip& cl ip, | 491 GrRenderTarget* rt, const GrClip& cl ip) { |
489 const GrPaint& paint) { | 492 cacheBlob->fPaintColor = color; |
joshualitt
2015/08/18 14:25:52
Could we put a comment here explaining that this i
jvanverth1
2015/08/18 14:37:53
Done.
| |
490 cacheBlob->fPaintColor = skPaint.getColor(); | |
491 cacheBlob->fViewMatrix = viewMatrix; | 493 cacheBlob->fViewMatrix = viewMatrix; |
492 cacheBlob->fX = x; | 494 cacheBlob->fX = x; |
493 cacheBlob->fY = y; | 495 cacheBlob->fY = y; |
494 | 496 |
495 // Regenerate textblob | 497 // Regenerate textblob |
496 SkPaint runPaint = skPaint; | 498 SkPaint runPaint = skPaint; |
497 SkTextBlob::RunIterator it(blob); | 499 SkTextBlob::RunIterator it(blob); |
498 for (int run = 0; !it.done(); it.next(), run++) { | 500 for (int run = 0; !it.done(); it.next(), run++) { |
499 int glyphCount = it.glyphCount(); | 501 int glyphCount = it.glyphCount(); |
500 size_t textLen = glyphCount * sizeof(uint16_t); | 502 size_t textLen = glyphCount * sizeof(uint16_t); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
559 case SkTextBlob::kFull_Positioning: { | 561 case SkTextBlob::kFull_Positioning: { |
560 dfOffset = SkPoint::Make(x, y); | 562 dfOffset = SkPoint::Make(x, y); |
561 this->internalDrawDFPosText(cacheBlob, run, cache, dfPaint, color, viewMatrix, | 563 this->internalDrawDFPosText(cacheBlob, run, cache, dfPaint, color, viewMatrix, |
562 (const char*)it.glyphs(), textLe n, it.pos(), | 564 (const char*)it.glyphs(), textLe n, it.pos(), |
563 scalarsPerPosition, dfOffset, cl ipRect, textRatio, | 565 scalarsPerPosition, dfOffset, cl ipRect, textRatio, |
564 &fallbackTxt, &fallbackPos); | 566 &fallbackTxt, &fallbackPos); |
565 break; | 567 break; |
566 } | 568 } |
567 } | 569 } |
568 if (fallbackTxt.count()) { | 570 if (fallbackTxt.count()) { |
569 this->fallbackDrawPosText(cacheBlob, run, rt, clip, paint, runPa int, viewMatrix, | 571 this->fallbackDrawPosText(cacheBlob, run, rt, clip, color, runPa int, viewMatrix, |
570 fallbackTxt, fallbackPos, scalarsPerPo sition, dfOffset, | 572 fallbackTxt, fallbackPos, scalarsPerPo sition, dfOffset, |
571 clipRect); | 573 clipRect); |
572 } | 574 } |
573 | 575 |
574 SkGlyphCache::AttachCache(cache); | 576 SkGlyphCache::AttachCache(cache); |
575 } else if (SkDraw::ShouldDrawTextAsPaths(runPaint, viewMatrix)) { | 577 } else if (SkDraw::ShouldDrawTextAsPaths(runPaint, viewMatrix)) { |
576 cacheBlob->fRuns[run].fDrawAsPaths = true; | 578 cacheBlob->fRuns[run].fDrawAsPaths = true; |
577 } else { | 579 } else { |
578 cacheBlob->setHasBitmap(); | 580 cacheBlob->setHasBitmap(); |
579 SkGlyphCache* cache = this->setupCache(&cacheBlob->fRuns[run], runPa int, &viewMatrix, | 581 SkGlyphCache* cache = this->setupCache(&cacheBlob->fRuns[run], runPa int, &viewMatrix, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
655 | 657 |
656 skPaint->setLCDRenderText(false); | 658 skPaint->setLCDRenderText(false); |
657 skPaint->setAutohinted(false); | 659 skPaint->setAutohinted(false); |
658 skPaint->setHinting(SkPaint::kNormal_Hinting); | 660 skPaint->setHinting(SkPaint::kNormal_Hinting); |
659 skPaint->setSubpixelText(true); | 661 skPaint->setSubpixelText(true); |
660 } | 662 } |
661 | 663 |
662 inline void GrAtlasTextContext::fallbackDrawPosText(GrAtlasTextBlob* blob, | 664 inline void GrAtlasTextContext::fallbackDrawPosText(GrAtlasTextBlob* blob, |
663 int runIndex, | 665 int runIndex, |
664 GrRenderTarget* rt, const Gr Clip& clip, | 666 GrRenderTarget* rt, const Gr Clip& clip, |
665 const GrPaint& paint, | 667 GrColor color, |
666 const SkPaint& skPaint, | 668 const SkPaint& skPaint, |
667 const SkMatrix& viewMatrix, | 669 const SkMatrix& viewMatrix, |
668 const SkTDArray<char>& fallb ackTxt, | 670 const SkTDArray<char>& fallb ackTxt, |
669 const SkTDArray<SkScalar>& f allbackPos, | 671 const SkTDArray<SkScalar>& f allbackPos, |
670 int scalarsPerPosition, | 672 int scalarsPerPosition, |
671 const SkPoint& offset, | 673 const SkPoint& offset, |
672 const SkIRect& clipRect) { | 674 const SkIRect& clipRect) { |
673 SkASSERT(fallbackTxt.count()); | 675 SkASSERT(fallbackTxt.count()); |
674 blob->setHasBitmap(); | 676 blob->setHasBitmap(); |
675 Run& run = blob->fRuns[runIndex]; | 677 Run& run = blob->fRuns[runIndex]; |
676 // Push back a new subrun to fill and set the override descriptor | 678 // Push back a new subrun to fill and set the override descriptor |
677 run.push_back(); | 679 run.push_back(); |
678 run.fOverrideDescriptor.reset(SkNEW(SkAutoDescriptor)); | 680 run.fOverrideDescriptor.reset(SkNEW(SkAutoDescriptor)); |
679 skPaint.getScalerContextDescriptor(run.fOverrideDescriptor, | 681 skPaint.getScalerContextDescriptor(run.fOverrideDescriptor, |
680 fSurfaceProps, &viewMatrix, false); | 682 fSurfaceProps, &viewMatrix, false); |
681 SkGlyphCache* cache = SkGlyphCache::DetachCache(run.fTypeface, | 683 SkGlyphCache* cache = SkGlyphCache::DetachCache(run.fTypeface, |
682 run.fOverrideDescriptor->get Desc()); | 684 run.fOverrideDescriptor->get Desc()); |
683 this->internalDrawBMPPosText(blob, runIndex, cache, skPaint, paint.getColor( ), viewMatrix, | 685 this->internalDrawBMPPosText(blob, runIndex, cache, skPaint, color, viewMatr ix, |
684 fallbackTxt.begin(), fallbackTxt.count(), | 686 fallbackTxt.begin(), fallbackTxt.count(), |
685 fallbackPos.begin(), scalarsPerPosition, offset , clipRect); | 687 fallbackPos.begin(), scalarsPerPosition, offset , clipRect); |
686 SkGlyphCache::AttachCache(cache); | 688 SkGlyphCache::AttachCache(cache); |
687 } | 689 } |
688 | 690 |
689 inline GrAtlasTextBlob* | 691 inline GrAtlasTextBlob* |
690 GrAtlasTextContext::setupDFBlob(int glyphCount, const SkPaint& origPaint, | 692 GrAtlasTextContext::setupDFBlob(int glyphCount, const SkPaint& origPaint, |
691 const SkMatrix& viewMatrix, SkGlyphCache** cache , | 693 const SkMatrix& viewMatrix, SkGlyphCache** cache , |
692 SkPaint* dfPaint, SkScalar* textRatio) { | 694 SkPaint* dfPaint, SkScalar* textRatio) { |
693 GrAtlasTextBlob* blob = fCache->createBlob(glyphCount, 1, kGrayTextVASize); | 695 GrAtlasTextBlob* blob = fCache->createBlob(glyphCount, 1, kGrayTextVASize); |
(...skipping 28 matching lines...) Expand all Loading... | |
722 blob = this->setupDFBlob(glyphCount, skPaint, viewMatrix, &cache, &dfPai nt, &textRatio); | 724 blob = this->setupDFBlob(glyphCount, skPaint, viewMatrix, &cache, &dfPai nt, &textRatio); |
723 | 725 |
724 SkTDArray<char> fallbackTxt; | 726 SkTDArray<char> fallbackTxt; |
725 SkTDArray<SkScalar> fallbackPos; | 727 SkTDArray<SkScalar> fallbackPos; |
726 SkPoint offset; | 728 SkPoint offset; |
727 this->internalDrawDFText(blob, 0, cache, dfPaint, paint.getColor(), view Matrix, text, | 729 this->internalDrawDFText(blob, 0, cache, dfPaint, paint.getColor(), view Matrix, text, |
728 byteLength, x, y, clipRect, textRatio, &fallbac kTxt, &fallbackPos, | 730 byteLength, x, y, clipRect, textRatio, &fallbac kTxt, &fallbackPos, |
729 &offset, skPaint); | 731 &offset, skPaint); |
730 SkGlyphCache::AttachCache(cache); | 732 SkGlyphCache::AttachCache(cache); |
731 if (fallbackTxt.count()) { | 733 if (fallbackTxt.count()) { |
732 this->fallbackDrawPosText(blob, 0, rt, clip, paint, skPaint, viewMat rix, fallbackTxt, | 734 this->fallbackDrawPosText(blob, 0, rt, clip, paint.getColor(), skPai nt, viewMatrix, |
733 fallbackPos, 2, offset, clipRect); | 735 fallbackTxt, fallbackPos, 2, offset, clipR ect); |
734 } | 736 } |
735 } else { | 737 } else { |
736 blob = fCache->createBlob(glyphCount, 1, kGrayTextVASize); | 738 blob = fCache->createBlob(glyphCount, 1, kGrayTextVASize); |
737 blob->fViewMatrix = viewMatrix; | 739 blob->fViewMatrix = viewMatrix; |
738 | 740 |
739 SkGlyphCache* cache = this->setupCache(&blob->fRuns[0], skPaint, &viewMa trix, false); | 741 SkGlyphCache* cache = this->setupCache(&blob->fRuns[0], skPaint, &viewMa trix, false); |
740 this->internalDrawBMPText(blob, 0, cache, skPaint, paint.getColor(), vie wMatrix, text, | 742 this->internalDrawBMPText(blob, 0, cache, skPaint, paint.getColor(), vie wMatrix, text, |
741 byteLength, x, y, clipRect); | 743 byteLength, x, y, clipRect); |
742 SkGlyphCache::AttachCache(cache); | 744 SkGlyphCache::AttachCache(cache); |
743 } | 745 } |
(...skipping 19 matching lines...) Expand all Loading... | |
763 SkGlyphCache* cache; | 765 SkGlyphCache* cache; |
764 blob = this->setupDFBlob(glyphCount, skPaint, viewMatrix, &cache, &dfPai nt, &textRatio); | 766 blob = this->setupDFBlob(glyphCount, skPaint, viewMatrix, &cache, &dfPai nt, &textRatio); |
765 | 767 |
766 SkTDArray<char> fallbackTxt; | 768 SkTDArray<char> fallbackTxt; |
767 SkTDArray<SkScalar> fallbackPos; | 769 SkTDArray<SkScalar> fallbackPos; |
768 this->internalDrawDFPosText(blob, 0, cache, dfPaint, paint.getColor(), v iewMatrix, text, | 770 this->internalDrawDFPosText(blob, 0, cache, dfPaint, paint.getColor(), v iewMatrix, text, |
769 byteLength, pos, scalarsPerPosition, offset, clipRect, | 771 byteLength, pos, scalarsPerPosition, offset, clipRect, |
770 textRatio, &fallbackTxt, &fallbackPos); | 772 textRatio, &fallbackTxt, &fallbackPos); |
771 SkGlyphCache::AttachCache(cache); | 773 SkGlyphCache::AttachCache(cache); |
772 if (fallbackTxt.count()) { | 774 if (fallbackTxt.count()) { |
773 this->fallbackDrawPosText(blob, 0, rt, clip, paint, skPaint, viewMat rix, fallbackTxt, | 775 this->fallbackDrawPosText(blob, 0, rt, clip, paint.getColor(), skPai nt, viewMatrix, |
774 fallbackPos, scalarsPerPosition, offset, c lipRect); | 776 fallbackTxt, fallbackPos, scalarsPerPositi on, offset, |
777 clipRect); | |
775 } | 778 } |
776 } else { | 779 } else { |
777 blob = fCache->createBlob(glyphCount, 1, kGrayTextVASize); | 780 blob = fCache->createBlob(glyphCount, 1, kGrayTextVASize); |
778 blob->fViewMatrix = viewMatrix; | 781 blob->fViewMatrix = viewMatrix; |
779 SkGlyphCache* cache = this->setupCache(&blob->fRuns[0], skPaint, &viewMa trix, false); | 782 SkGlyphCache* cache = this->setupCache(&blob->fRuns[0], skPaint, &viewMa trix, false); |
780 this->internalDrawBMPPosText(blob, 0, cache, skPaint, paint.getColor(), viewMatrix, text, | 783 this->internalDrawBMPPosText(blob, 0, cache, skPaint, paint.getColor(), viewMatrix, text, |
781 byteLength, pos, scalarsPerPosition, offset , clipRect); | 784 byteLength, pos, scalarsPerPosition, offset , clipRect); |
782 SkGlyphCache::AttachCache(cache); | 785 SkGlyphCache::AttachCache(cache); |
783 } | 786 } |
784 return blob; | 787 return blob; |
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2282 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text, | 2285 gTextContext->createDrawTextBlob(rt, clip, grPaint, skPaint, viewMat rix, text, |
2283 static_cast<size_t>(textLen), 0, 0, noClip)); | 2286 static_cast<size_t>(textLen), 0, 0, noClip)); |
2284 | 2287 |
2285 SkScalar transX = static_cast<SkScalar>(random->nextU()); | 2288 SkScalar transX = static_cast<SkScalar>(random->nextU()); |
2286 SkScalar transY = static_cast<SkScalar>(random->nextU()); | 2289 SkScalar transY = static_cast<SkScalar>(random->nextU()); |
2287 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0] ; | 2290 const GrAtlasTextBlob::Run::SubRunInfo& info = blob->fRuns[0].fSubRunInfo[0] ; |
2288 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint); | 2291 return gTextContext->createBatch(blob, info, textLen, 0, 0, color, transX, t ransY, skPaint); |
2289 } | 2292 } |
2290 | 2293 |
2291 #endif | 2294 #endif |
OLD | NEW |