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

Unified Diff: src/core/SkDraw.cpp

Issue 38573007: Do not apply hairline optimization for paths if nv_path_rendering is used (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: address review comments Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: src/core/SkDraw.cpp
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index d2d618090e39d4e085bbf5cf8174721bbe990b93..af070f029af5831fd060f23d278224814638ffe9 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -987,24 +987,12 @@ static bool xfermodeSupportsCoverageAsAlpha(SkXfermode* xfer) {
}
}
-bool SkDrawTreatAsHairline(const SkPaint& paint, const SkMatrix& matrix,
- SkScalar* coverage) {
+bool SkDrawTreatAAStrokeAsHairline(SkScalar strokeWidth, const SkMatrix& matrix,
+ SkScalar* coverage) {
SkASSERT(coverage);
- if (SkPaint::kStroke_Style != paint.getStyle()) {
- return false;
- }
- SkScalar strokeWidth = paint.getStrokeWidth();
- if (0 == strokeWidth) {
- *coverage = SK_Scalar1;
- return true;
- }
+ SkASSERT(strokeWidth > 0);
+ // We need to try to fake a thick-stroke with a modulated hairline.
- // if we get here, we need to try to fake a thick-stroke with a modulated
- // hairline
-
- if (!paint.isAntiAlias()) {
- return false;
- }
if (matrix.hasPerspective()) {
return false;
}
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/core/SkDrawProcs.h » ('j') | src/core/SkDrawProcs.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698