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

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

Issue 1506823004: Remove drawPathsFromRange from GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: formatting Created 5 years 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/GrStencilAndCoverTextContext.h ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | 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 "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 localMatrix.setTranslateY(y); 516 localMatrix.setTranslateY(y);
517 517
518 // Don't compute a bounding box. For dst copy texture, we'll opt instead for it to just copy 518 // Don't compute a bounding box. For dst copy texture, we'll opt instead for it to just copy
519 // the entire dst. Realistically this is a moot point, because any conte xt that supports 519 // the entire dst. Realistically this is a moot point, because any conte xt that supports
520 // NV_path_rendering will also support NV_blend_equation_advanced. 520 // NV_path_rendering will also support NV_blend_equation_advanced.
521 // For clipping we'll just skip any optimizations based on the bounds. T his does, however, 521 // For clipping we'll just skip any optimizations based on the bounds. T his does, however,
522 // hurt batching. 522 // hurt batching.
523 SkRect bounds = SkRect::MakeIWH(pipelineBuilder->getRenderTarget()->widt h(), 523 SkRect bounds = SkRect::MakeIWH(pipelineBuilder->getRenderTarget()->widt h(),
524 pipelineBuilder->getRenderTarget()->heig ht()); 524 pipelineBuilder->getRenderTarget()->heig ht());
525 525
526 dc->drawPathsFromRange(pipelineBuilder, drawMatrix, localMatrix, color, glyphs, fDraw, 526 SkAutoTUnref<GrDrawPathBatchBase> batch(
527 GrPathRendering::kWinding_FillType, bounds); 527 GrDrawPathRangeBatch::Create(drawMatrix, localMatrix, color,
528 GrPathRendering::kWinding_FillType, gly phs, fDraw,
529 bounds));
530
531 dc->drawPathBatch(*pipelineBuilder, batch);
528 } 532 }
529 533
530 if (fFallbackTextBlob) { 534 if (fFallbackTextBlob) {
531 SkPaint fallbackSkPaint(originalSkPaint); 535 SkPaint fallbackSkPaint(originalSkPaint);
532 fStroke.applyToPaint(&fallbackSkPaint); 536 fStroke.applyToPaint(&fallbackSkPaint);
533 if (!fStroke.isFillStyle()) { 537 if (!fStroke.isFillStyle()) {
534 fallbackSkPaint.setStrokeWidth(fStroke.getWidth() * fTextRatio); 538 fallbackSkPaint.setStrokeWidth(fStroke.getWidth() * fTextRatio);
535 } 539 }
536 540
537 fallbackTextContext->drawTextBlob(dc, pipelineBuilder->clip(), fallbackS kPaint, viewMatrix, 541 fallbackTextContext->drawTextBlob(dc, pipelineBuilder->clip(), fallbackS kPaint, viewMatrix,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 fBuffIdx = 0; 611 fBuffIdx = 0;
608 } 612 }
609 613
610 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfInit ialized() { 614 const SkTextBlob* GrStencilAndCoverTextContext::FallbackBlobBuilder::buildIfInit ialized() {
611 if (!this->isInitialized()) { 615 if (!this->isInitialized()) {
612 return nullptr; 616 return nullptr;
613 } 617 }
614 this->flush(); 618 this->flush();
615 return fBuilder->build(); 619 return fBuilder->build();
616 } 620 }
OLDNEW
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.h ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698