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

Side by Side Diff: src/gpu/GrAAHairLinePathRenderer.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/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/GrAtlasTextContext.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 2011 Google Inc. 2 * Copyright 2011 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 "GrAAHairLinePathRenderer.h" 8 #include "GrAAHairLinePathRenderer.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 bool antiAlias) const { 642 bool antiAlias) const {
643 if (!antiAlias) { 643 if (!antiAlias) {
644 return false; 644 return false;
645 } 645 }
646 646
647 if (!IsStrokeHairlineOrEquivalent(stroke, viewMatrix, NULL)) { 647 if (!IsStrokeHairlineOrEquivalent(stroke, viewMatrix, NULL)) {
648 return false; 648 return false;
649 } 649 }
650 650
651 if (SkPath::kLine_SegmentMask == path.getSegmentMasks() || 651 if (SkPath::kLine_SegmentMask == path.getSegmentMasks() ||
652 target->caps()->shaderDerivativeSupport()) { 652 target->caps()->shaderCaps()->shaderDerivativeSupport()) {
653 return true; 653 return true;
654 } 654 }
655 return false; 655 return false;
656 } 656 }
657 657
658 template <class VertexType> 658 template <class VertexType>
659 bool check_bounds(const SkMatrix& viewMatrix, const SkRect& devBounds, void* ver tices, int vCount) 659 bool check_bounds(const SkMatrix& viewMatrix, const SkRect& devBounds, void* ver tices, int vCount)
660 { 660 {
661 SkRect tolDevBounds = devBounds; 661 SkRect tolDevBounds = devBounds;
662 // The bounds ought to be tight, but in perspective the below code runs the verts 662 // The bounds ought to be tight, but in perspective the below code runs the verts
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 geometry.fPath = path; 1060 geometry.fPath = path;
1061 SkDEBUGCODE(geometry.fDevBounds = devRect;) 1061 SkDEBUGCODE(geometry.fDevBounds = devRect;)
1062 geometry.fDevClipBounds = devClipBounds; 1062 geometry.fDevClipBounds = devClipBounds;
1063 1063
1064 SkAutoTUnref<GrBatch> batch(AAHairlineBatch::Create(geometry, fLinesIndexBuf fer, 1064 SkAutoTUnref<GrBatch> batch(AAHairlineBatch::Create(geometry, fLinesIndexBuf fer,
1065 fQuadsIndexBuffer)); 1065 fQuadsIndexBuffer));
1066 target->drawBatch(pipelineBuilder, batch, &devRect); 1066 target->drawBatch(pipelineBuilder, batch, &devRect);
1067 1067
1068 return true; 1068 return true;
1069 } 1069 }
OLDNEW
« no previous file with comments | « src/gpu/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698