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

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

Issue 23137022: Replace uses of GR_DEBUG by SK_DEBUG. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: not GR_RELEASE Created 7 years, 3 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 | « include/gpu/gl/GrGLConfig.h ('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 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 SkSTArray<kPreallocDrawCnt, Draw, true> draws; 663 SkSTArray<kPreallocDrawCnt, Draw, true> draws;
664 create_vertices(segments, fanPt, &draws, verts, idxs); 664 create_vertices(segments, fanPt, &draws, verts, idxs);
665 665
666 // This is valid because all the computed verts are within 1 pixel of the pa th control points. 666 // This is valid because all the computed verts are within 1 pixel of the pa th control points.
667 SkRect devBounds; 667 SkRect devBounds;
668 devBounds = path->getBounds(); 668 devBounds = path->getBounds();
669 viewMatrix.mapRect(&devBounds); 669 viewMatrix.mapRect(&devBounds);
670 devBounds.outset(SK_Scalar1, SK_Scalar1); 670 devBounds.outset(SK_Scalar1, SK_Scalar1);
671 671
672 // Check devBounds 672 // Check devBounds
673 #if GR_DEBUG 673 #ifdef SK_DEBUG
674 SkRect tolDevBounds = devBounds; 674 SkRect tolDevBounds = devBounds;
675 tolDevBounds.outset(SK_Scalar1 / 10000, SK_Scalar1 / 10000); 675 tolDevBounds.outset(SK_Scalar1 / 10000, SK_Scalar1 / 10000);
676 SkRect actualBounds; 676 SkRect actualBounds;
677 actualBounds.set(verts[0].fPos, verts[1].fPos); 677 actualBounds.set(verts[0].fPos, verts[1].fPos);
678 for (int i = 2; i < vCount; ++i) { 678 for (int i = 2; i < vCount; ++i) {
679 actualBounds.growToInclude(verts[i].fPos.fX, verts[i].fPos.fY); 679 actualBounds.growToInclude(verts[i].fPos.fX, verts[i].fPos.fY);
680 } 680 }
681 SkASSERT(tolDevBounds.contains(actualBounds)); 681 SkASSERT(tolDevBounds.contains(actualBounds));
682 #endif 682 #endif
683 683
684 int vOffset = 0; 684 int vOffset = 0;
685 for (int i = 0; i < draws.count(); ++i) { 685 for (int i = 0; i < draws.count(); ++i) {
686 const Draw& draw = draws[i]; 686 const Draw& draw = draws[i];
687 target->drawIndexed(kTriangles_GrPrimitiveType, 687 target->drawIndexed(kTriangles_GrPrimitiveType,
688 vOffset, // start vertex 688 vOffset, // start vertex
689 0, // start index 689 0, // start index
690 draw.fVertexCnt, 690 draw.fVertexCnt,
691 draw.fIndexCnt, 691 draw.fIndexCnt,
692 &devBounds); 692 &devBounds);
693 vOffset += draw.fVertexCnt; 693 vOffset += draw.fVertexCnt;
694 } 694 }
695 695
696 return true; 696 return true;
697 } 697 }
OLDNEW
« no previous file with comments | « include/gpu/gl/GrGLConfig.h ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698