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

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

Issue 66813002: Revert "Do not apply hairline optimization for paths if nv_path_rendering is used" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | « src/core/SkDrawProcs.h ('k') | src/gpu/GrContext.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 "GrContext.h" 10 #include "GrContext.h"
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 const SkMatrix* toSrc = NULL; 752 const SkMatrix* toSrc = NULL;
753 SkMatrix ivm; 753 SkMatrix ivm;
754 754
755 if (viewM.hasPerspective()) { 755 if (viewM.hasPerspective()) {
756 if (viewM.invert(&ivm)) { 756 if (viewM.invert(&ivm)) {
757 toSrc = &ivm; 757 toSrc = &ivm;
758 } 758 }
759 } 759 }
760 devBounds->set(lines.begin(), lines.count()); 760 devBounds->set(lines.begin(), lines.count());
761 for (int i = 0; i < lineCnt; ++i) { 761 for (int i = 0; i < lineCnt; ++i) {
762 add_line(&lines[2*i], toSrc, drawState->getCoverageColor(), &verts); 762 add_line(&lines[2*i], toSrc, drawState->getCoverage(), &verts);
763 } 763 }
764 // All the verts computed by add_line are within sqrt(1^2 + 0.5^2) of the en d points. 764 // All the verts computed by add_line are within sqrt(1^2 + 0.5^2) of the en d points.
765 static const SkScalar kSqrtOfOneAndAQuarter = SkFloatToScalar(1.118f); 765 static const SkScalar kSqrtOfOneAndAQuarter = SkFloatToScalar(1.118f);
766 // Add a little extra to account for vector normalization precision. 766 // Add a little extra to account for vector normalization precision.
767 static const SkScalar kOutset = kSqrtOfOneAndAQuarter + SK_Scalar1 / 20; 767 static const SkScalar kOutset = kSqrtOfOneAndAQuarter + SK_Scalar1 / 20;
768 devBounds->outset(kOutset, kOutset); 768 devBounds->outset(kOutset, kOutset);
769 769
770 return true; 770 return true;
771 } 771 }
772 772
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 &devBounds); 1028 &devBounds);
1029 conics += n; 1029 conics += n;
1030 } 1030 }
1031 } 1031 }
1032 } 1032 }
1033 1033
1034 target->resetIndexSource(); 1034 target->resetIndexSource();
1035 1035
1036 return true; 1036 return true;
1037 } 1037 }
OLDNEW
« no previous file with comments | « src/core/SkDrawProcs.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698