Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/gpu/text/GrStencilAndCoverTextContext.cpp

Issue 2035823002: Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "GrStencilAndCoverTextContext.h" 8 #include "GrStencilAndCoverTextContext.h"
9 #include "GrAtlasTextContext.h" 9 #include "GrAtlasTextContext.h"
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 // hurt batching. 640 // hurt batching.
641 SkRect bounds = SkRect::MakeIWH(pipelineBuilder->getRenderTarget()->widt h(), 641 SkRect bounds = SkRect::MakeIWH(pipelineBuilder->getRenderTarget()->widt h(),
642 pipelineBuilder->getRenderTarget()->heig ht()); 642 pipelineBuilder->getRenderTarget()->heig ht());
643 643
644 SkAutoTUnref<GrDrawBatch> batch( 644 SkAutoTUnref<GrDrawBatch> batch(
645 GrDrawPathRangeBatch::Create(viewMatrix, fTextRatio, fTextInverseRat io * x, 645 GrDrawPathRangeBatch::Create(viewMatrix, fTextRatio, fTextInverseRat io * x,
646 fTextInverseRatio * y, color, 646 fTextInverseRatio * y, color,
647 GrPathRendering::kWinding_FillType, gly phs, fInstanceData, 647 GrPathRendering::kWinding_FillType, gly phs, fInstanceData,
648 bounds)); 648 bounds));
649 649
650 dc->drawBatch(pipelineBuilder, clip, batch); 650 dc->drawBatch(*pipelineBuilder, clip, batch);
651 } 651 }
652 652
653 if (fFallbackTextBlob) { 653 if (fFallbackTextBlob) {
654 SkPaint fallbackSkPaint(originalSkPaint); 654 SkPaint fallbackSkPaint(originalSkPaint);
655 fStyle.strokeRec().applyToPaint(&fallbackSkPaint); 655 fStyle.strokeRec().applyToPaint(&fallbackSkPaint);
656 if (!fStyle.isSimpleFill()) { 656 if (!fStyle.isSimpleFill()) {
657 fallbackSkPaint.setStrokeWidth(fStyle.strokeRec().getWidth() * fText Ratio); 657 fallbackSkPaint.setStrokeWidth(fStyle.strokeRec().getWidth() * fText Ratio);
658 } 658 }
659 659
660 fallbackTextContext->drawTextBlob(ctx, dc, clip, fallbackSkPaint, viewMa trix, props, 660 fallbackTextContext->drawTextBlob(ctx, dc, clip, fallbackSkPaint, viewMa trix, props,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 } 733 }
734 734
735 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed ed(int *count) { 735 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed ed(int *count) {
736 *count = fCount; 736 *count = fCount;
737 if (fCount) { 737 if (fCount) {
738 this->flush(); 738 this->flush();
739 return fBuilder->build(); 739 return fBuilder->build();
740 } 740 }
741 return nullptr; 741 return nullptr;
742 } 742 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698