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

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

Issue 1116713002: Pull out shader-specific caps into GrShaderCaps and GrGLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up some comments Created 5 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/GrDrawTargetCaps.h ('k') | src/gpu/GrPrimitiveProcessor.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 2013 Google Inc. 2 * Copyright 2013 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 "GrOvalRenderer.h" 8 #include "GrOvalRenderer.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 !pipelineBuilder->getRenderTarget()->isMultisampled(); 662 !pipelineBuilder->getRenderTarget()->isMultisampled();
663 663
664 if (!useCoverageAA) { 664 if (!useCoverageAA) {
665 return false; 665 return false;
666 } 666 }
667 667
668 // we can draw circles 668 // we can draw circles
669 if (SkScalarNearlyEqual(oval.width(), oval.height()) && circle_stays_circle( viewMatrix)) { 669 if (SkScalarNearlyEqual(oval.width(), oval.height()) && circle_stays_circle( viewMatrix)) {
670 this->drawCircle(target, pipelineBuilder, color, viewMatrix, useCoverage AA, oval, stroke); 670 this->drawCircle(target, pipelineBuilder, color, viewMatrix, useCoverage AA, oval, stroke);
671 // if we have shader derivative support, render as device-independent 671 // if we have shader derivative support, render as device-independent
672 } else if (target->caps()->shaderDerivativeSupport()) { 672 } else if (target->caps()->shaderCaps()->shaderDerivativeSupport()) {
673 return this->drawDIEllipse(target, pipelineBuilder, color, viewMatrix, u seCoverageAA, oval, 673 return this->drawDIEllipse(target, pipelineBuilder, color, viewMatrix, u seCoverageAA, oval,
674 stroke); 674 stroke);
675 // otherwise axis-aligned ellipses only 675 // otherwise axis-aligned ellipses only
676 } else if (viewMatrix.rectStaysRect()) { 676 } else if (viewMatrix.rectStaysRect()) {
677 return this->drawEllipse(target, pipelineBuilder, color, viewMatrix, use CoverageAA, oval, 677 return this->drawEllipse(target, pipelineBuilder, color, viewMatrix, use CoverageAA, oval,
678 stroke); 678 stroke);
679 } else { 679 } else {
680 return false; 680 return false;
681 } 681 }
682 682
(...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after
2223 geometry.fInnerXRadius = innerXRadius; 2223 geometry.fInnerXRadius = innerXRadius;
2224 geometry.fInnerYRadius = innerYRadius; 2224 geometry.fInnerYRadius = innerYRadius;
2225 geometry.fStroke = isStrokeOnly; 2225 geometry.fStroke = isStrokeOnly;
2226 geometry.fDevBounds = bounds; 2226 geometry.fDevBounds = bounds;
2227 2227
2228 SkAutoTUnref<GrBatch> batch(RRectEllipseRendererBatch::Create(geometry, indexBuffer)); 2228 SkAutoTUnref<GrBatch> batch(RRectEllipseRendererBatch::Create(geometry, indexBuffer));
2229 target->drawBatch(pipelineBuilder, batch, &bounds); 2229 target->drawBatch(pipelineBuilder, batch, &bounds);
2230 } 2230 }
2231 return true; 2231 return true;
2232 } 2232 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTargetCaps.h ('k') | src/gpu/GrPrimitiveProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698