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

Side by Side Diff: src/gpu/GrAADistanceFieldPathRenderer.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/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrAADistanceFieldPathRenderer.h" 9 #include "GrAADistanceFieldPathRenderer.h"
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 //////////////////////////////////////////////////////////////////////////////// 85 ////////////////////////////////////////////////////////////////////////////////
86 bool GrAADistanceFieldPathRenderer::canDrawPath(const GrDrawTarget* target, 86 bool GrAADistanceFieldPathRenderer::canDrawPath(const GrDrawTarget* target,
87 const GrPipelineBuilder* pipelin eBuilder, 87 const GrPipelineBuilder* pipelin eBuilder,
88 const SkMatrix& viewMatrix, 88 const SkMatrix& viewMatrix,
89 const SkPath& path, 89 const SkPath& path,
90 const GrStrokeInfo& stroke, 90 const GrStrokeInfo& stroke,
91 bool antiAlias) const { 91 bool antiAlias) const {
92 92
93 // TODO: Support inverse fill 93 // TODO: Support inverse fill
94 // TODO: Support strokes 94 // TODO: Support strokes
95 if (!target->caps()->shaderDerivativeSupport() || !antiAlias || path.isInver seFillType() 95 if (!target->caps()->shaderCaps()->shaderDerivativeSupport() || !antiAlias
96 || path.isVolatile() || !stroke.isFillStyle()) { 96 || path.isInverseFillType() || path.isVolatile() || !stroke.isFillStyle( )) {
97 return false; 97 return false;
98 } 98 }
99 99
100 // currently don't support perspective 100 // currently don't support perspective
101 if (viewMatrix.hasPerspective()) { 101 if (viewMatrix.hasPerspective()) {
102 return false; 102 return false;
103 } 103 }
104 104
105 // only support paths smaller than 64x64, scaled to less than 256x256 105 // only support paths smaller than 64x64, scaled to less than 256x256
106 // the goal is to accelerate rendering of lots of small paths that may be sc aling 106 // the goal is to accelerate rendering of lots of small paths that may be sc aling
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color , viewMatrix, 608 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color , viewMatrix,
609 fAtlas, &fPathC ache, &fPathList)); 609 fAtlas, &fPathC ache, &fPathList));
610 610
611 SkRect bounds = path.getBounds(); 611 SkRect bounds = path.getBounds();
612 viewMatrix.mapRect(&bounds); 612 viewMatrix.mapRect(&bounds);
613 target->drawBatch(pipelineBuilder, batch, &bounds); 613 target->drawBatch(pipelineBuilder, batch, &bounds);
614 614
615 return true; 615 return true;
616 } 616 }
617 617
OLDNEW
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698