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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Path.cpp

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: Rebase Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
3 * 2006 Rob Buis <buis@kde.org> 3 * 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2013 Google Inc. All rights reserved. 5 * Copyright (C) 2013 Google Inc. All rights reserved.
6 * Copyright (C) 2013 Intel Corporation. All rights reserved. 6 * Copyright (C) 2013 Intel Corporation. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 SkPath tmp(m_path); 79 SkPath tmp(m_path);
80 tmp.setFillType(fillType); 80 tmp.setFillType(fillType);
81 return tmp.contains(x, y); 81 return tmp.contains(x, y);
82 } 82 }
83 return m_path.contains(x, y); 83 return m_path.contains(x, y);
84 } 84 }
85 85
86 // FIXME: this method ignores the CTM and may yield inaccurate results for large 86 // FIXME: this method ignores the CTM and may yield inaccurate results for large
87 // scales. 87 // scales.
88 SkPath Path::strokePath(const StrokeData& strokeData) const { 88 SkPath Path::strokePath(const StrokeData& strokeData) const {
89 SkPaint paint; 89 PaintFlags paint;
90 strokeData.setupPaint(&paint); 90 strokeData.setupPaint(&paint);
91 91
92 // Skia stroke resolution scale. This is multiplied by 4 internally 92 // Skia stroke resolution scale. This is multiplied by 4 internally
93 // (i.e. 1.0 corresponds to 1/4 pixel res). 93 // (i.e. 1.0 corresponds to 1/4 pixel res).
94 static const SkScalar kResScale = 0.3f; 94 static const SkScalar kResScale = 0.3f;
95 95
96 SkPath strokePath; 96 SkPath strokePath;
97 paint.getFillPath(m_path, &strokePath, nullptr, kResScale); 97 paint.getFillPath(m_path, &strokePath, nullptr, kResScale);
98 98
99 return strokePath; 99 return strokePath;
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 } 550 }
551 551
552 #if DCHECK_IS_ON() 552 #if DCHECK_IS_ON()
553 bool ellipseIsRenderable(float startAngle, float endAngle) { 553 bool ellipseIsRenderable(float startAngle, float endAngle) {
554 return (std::abs(endAngle - startAngle) < twoPiFloat) || 554 return (std::abs(endAngle - startAngle) < twoPiFloat) ||
555 WebCoreFloatNearlyEqual(std::abs(endAngle - startAngle), twoPiFloat); 555 WebCoreFloatNearlyEqual(std::abs(endAngle - startAngle), twoPiFloat);
556 } 556 }
557 #endif 557 #endif
558 558
559 } // namespace blink 559 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698