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

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

Issue 1966763002: Eliminate special case nvpr batch handling (Closed) Base URL: https://skia.googlesource.com/skia.git@reallyupload_userstencil
Patch Set: fixes Created 4 years, 7 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
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 } 630 }
631 631
632 // Don't compute a bounding box. For dst copy texture, we'll opt instead for it to just copy 632 // Don't compute a bounding box. For dst copy texture, we'll opt instead for it to just copy
633 // the entire dst. Realistically this is a moot point, because any conte xt that supports 633 // the entire dst. Realistically this is a moot point, because any conte xt that supports
634 // NV_path_rendering will also support NV_blend_equation_advanced. 634 // NV_path_rendering will also support NV_blend_equation_advanced.
635 // For clipping we'll just skip any optimizations based on the bounds. T his does, however, 635 // For clipping we'll just skip any optimizations based on the bounds. T his does, however,
636 // hurt batching. 636 // hurt batching.
637 SkRect bounds = SkRect::MakeIWH(pipelineBuilder->getRenderTarget()->widt h(), 637 SkRect bounds = SkRect::MakeIWH(pipelineBuilder->getRenderTarget()->widt h(),
638 pipelineBuilder->getRenderTarget()->heig ht()); 638 pipelineBuilder->getRenderTarget()->heig ht());
639 639
640 SkAutoTUnref<GrDrawPathBatchBase> batch( 640 SkAutoTUnref<GrDrawBatch> batch(
641 GrDrawPathRangeBatch::Create(viewMatrix, fTextRatio, fTextInverseRat io * x, 641 GrDrawPathRangeBatch::Create(viewMatrix, fTextRatio, fTextInverseRat io * x,
642 fTextInverseRatio * y, color, 642 fTextInverseRatio * y, color,
643 GrPathRendering::kWinding_FillType, gly phs, fInstanceData, 643 GrPathRendering::kWinding_FillType, gly phs, fInstanceData,
644 bounds)); 644 bounds));
645 645
646 dc->drawPathBatch(*pipelineBuilder, batch); 646 dc->drawBatch(pipelineBuilder, batch);
647 } 647 }
648 648
649 if (fFallbackTextBlob) { 649 if (fFallbackTextBlob) {
650 SkPaint fallbackSkPaint(originalSkPaint); 650 SkPaint fallbackSkPaint(originalSkPaint);
651 fStyle.strokeRec().applyToPaint(&fallbackSkPaint); 651 fStyle.strokeRec().applyToPaint(&fallbackSkPaint);
652 if (!fStyle.isSimpleFill()) { 652 if (!fStyle.isSimpleFill()) {
653 fallbackSkPaint.setStrokeWidth(fStyle.strokeRec().getWidth() * fText Ratio); 653 fallbackSkPaint.setStrokeWidth(fStyle.strokeRec().getWidth() * fText Ratio);
654 } 654 }
655 655
656 fallbackTextContext->drawTextBlob(ctx, dc, pipelineBuilder->clip(), fall backSkPaint, 656 fallbackTextContext->drawTextBlob(ctx, dc, pipelineBuilder->clip(), fall backSkPaint,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 } 730 }
731 731
732 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed ed(int *count) { 732 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfNeed ed(int *count) {
733 *count = fCount; 733 *count = fCount;
734 if (fCount) { 734 if (fCount) {
735 this->flush(); 735 this->flush();
736 return fBuilder->build(); 736 return fBuilder->build();
737 } 737 }
738 return nullptr; 738 return nullptr;
739 } 739 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698