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

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

Issue 12843026: Make GrDrawTarget::Caps ref counted and GrGLCaps derive from it. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | src/gpu/gl/GrGLContext.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 "GrAAConvexPathRenderer.h" 9 #include "GrAAConvexPathRenderer.h"
10 10
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 425 }
426 } 426 }
427 } 427 }
428 428
429 } 429 }
430 430
431 bool GrAAConvexPathRenderer::canDrawPath(const SkPath& path, 431 bool GrAAConvexPathRenderer::canDrawPath(const SkPath& path,
432 const SkStrokeRec& stroke, 432 const SkStrokeRec& stroke,
433 const GrDrawTarget* target, 433 const GrDrawTarget* target,
434 bool antiAlias) const { 434 bool antiAlias) const {
435 return (target->getCaps().shaderDerivativeSupport() && antiAlias && 435 return (target->caps()->shaderDerivativeSupport() && antiAlias &&
436 stroke.isFillStyle() && !path.isInverseFillType() && path.isConvex() ); 436 stroke.isFillStyle() && !path.isInverseFillType() && path.isConvex() );
437 } 437 }
438 438
439 bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath, 439 bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath,
440 const SkStrokeRec&, 440 const SkStrokeRec&,
441 GrDrawTarget* target, 441 GrDrawTarget* target,
442 bool antiAlias) { 442 bool antiAlias) {
443 443
444 const SkPath* path = &origPath; 444 const SkPath* path = &origPath;
445 if (path->isEmpty()) { 445 if (path->isEmpty()) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 drawState->setVertexEdgeType(GrDrawState::kQuad_EdgeType); 503 drawState->setVertexEdgeType(GrDrawState::kQuad_EdgeType);
504 target->drawIndexed(kTriangles_GrPrimitiveType, 504 target->drawIndexed(kTriangles_GrPrimitiveType,
505 0, // start vertex 505 0, // start vertex
506 0, // start index 506 0, // start index
507 vCount, 507 vCount,
508 iCount); 508 iCount);
509 drawState->setVertexEdgeType(oldEdgeType); 509 drawState->setVertexEdgeType(oldEdgeType);
510 510
511 return true; 511 return true;
512 } 512 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | src/gpu/gl/GrGLContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698