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

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

Issue 884013010: Default path renderer batch (Closed) Base URL: https://skia.googlesource.com/skia.git@strokerect
Patch Set: windows warnings Created 5 years, 9 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 | « no previous file | src/gpu/GrDefaultPathRenderer.cpp » ('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 2012 Google Inc. 2 * Copyright 2012 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 "GrAARectRenderer.h" 8 #include "GrAARectRenderer.h"
9 #include "GrBatch.h" 9 #include "GrBatch.h"
10 #include "GrBatchTarget.h" 10 #include "GrBatchTarget.h"
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage(); 581 bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage();
582 582
583 // Local matrix is ignored if we don't have local coords. If we have lo calcoords we only 583 // Local matrix is ignored if we don't have local coords. If we have lo calcoords we only
584 // batch with identical view matrices 584 // batch with identical view matrices
585 SkMatrix localMatrix; 585 SkMatrix localMatrix;
586 if (this->usesLocalCoords() && !this->viewMatrix().invert(&localMatrix)) { 586 if (this->usesLocalCoords() && !this->viewMatrix().invert(&localMatrix)) {
587 SkDebugf("Cannot invert\n"); 587 SkDebugf("Cannot invert\n");
588 return; 588 return;
589 } 589 }
590 590
591 SkAutoTUnref<const GrGeometryProcessor>gp(create_fill_rect_gp(canTweakAl phaForCoverage, 591 SkAutoTUnref<const GrGeometryProcessor> gp(create_fill_rect_gp(canTweakA lphaForCoverage,
592 localMatri x)); 592 localMatr ix));
593 593
594 batchTarget->initDraw(gp, pipeline); 594 batchTarget->initDraw(gp, pipeline);
595 595
596 // TODO this is hacky, but the only way we have to initialize the GP is to use the 596 // TODO this is hacky, but the only way we have to initialize the GP is to use the
597 // GrPipelineInfo struct so we can generate the correct shader. Once we have GrBatch 597 // GrPipelineInfo struct so we can generate the correct shader. Once we have GrBatch
598 // everywhere we can remove this nastiness 598 // everywhere we can remove this nastiness
599 GrPipelineInfo init; 599 GrPipelineInfo init;
600 init.fColorIgnored = fBatch.fColorIgnored; 600 init.fColorIgnored = fBatch.fColorIgnored;
601 init.fOverrideColor = GrColor_ILLEGAL; 601 init.fOverrideColor = GrColor_ILLEGAL;
602 init.fCoverageIgnored = fBatch.fCoverageIgnored; 602 init.fCoverageIgnored = fBatch.fCoverageIgnored;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 878
879 if (devInside.isEmpty()) { 879 if (devInside.isEmpty()) {
880 this->fillAARect(target, pipelineBuilder, color, viewMatrix, devOutside, 880 this->fillAARect(target, pipelineBuilder, color, viewMatrix, devOutside,
881 devOutside); 881 devOutside);
882 return; 882 return;
883 } 883 }
884 884
885 this->geometryStrokeAARect(target, pipelineBuilder, color, viewMatrix, devOu tside, 885 this->geometryStrokeAARect(target, pipelineBuilder, color, viewMatrix, devOu tside,
886 devOutsideAssist, devInside, true); 886 devOutsideAssist, devInside, true);
887 } 887 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698