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

Unified Diff: third_party/WebKit/Source/platform/graphics/Gradient.cpp

Issue 2792163002: Add support for repeating-conic-gradient() (Closed)
Patch Set: baselines Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Gradient.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/Gradient.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Gradient.cpp b/third_party/WebKit/Source/platform/graphics/Gradient.cpp
index df22651ca055c1830cf86701445ff2e07922c3bd..1c92f65cf77a6334343ed056c21858ce31e4679d 100644
--- a/third_party/WebKit/Source/platform/graphics/Gradient.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Gradient.cpp
@@ -259,9 +259,8 @@ class ConicGradient final : public Gradient {
public:
ConicGradient(const FloatPoint& position,
float angle,
- GradientSpreadMethod spreadMethod,
ColorInterpolation interpolation)
- : Gradient(Type::Conic, spreadMethod, interpolation),
+ : Gradient(Type::Conic, SpreadMethodPad, interpolation),
m_position(position),
m_angle(angle) {}
@@ -271,10 +270,7 @@ class ConicGradient final : public Gradient {
SkShader::TileMode tileMode,
uint32_t flags,
const SkMatrix& localMatrix) const override {
- if (tileMode != SkShader::kClamp_TileMode) {
- // TODO(fmalita): kRepeat support
- return nullptr;
- }
+ DCHECK_NE(tileMode, SkShader::kMirror_TileMode);
// Skia's sweep gradient angles are relative to the x-axis, not the y-axis.
const float skiaAngle = m_angle - 90;
@@ -316,10 +312,8 @@ PassRefPtr<Gradient> Gradient::createRadial(const FloatPoint& p0,
PassRefPtr<Gradient> Gradient::createConic(const FloatPoint& position,
float angle,
- GradientSpreadMethod spreadMethod,
ColorInterpolation interpolation) {
- return adoptRef(
- new ConicGradient(position, angle, spreadMethod, interpolation));
+ return adoptRef(new ConicGradient(position, angle, interpolation));
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Gradient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698