Commit a1f25a6c authored by fmalita's avatar fmalita Committed by Commit bot

Remove Gradient point/radius setters

These are only called from CSSGradientValue to adjust the points/radii
immediately after Gradient instantiation.

Refactor CSSGradientValue to perform the adjustment before constructing
the Gradient object.  No functional changes.

BUG=614368
R=schenney@chromium.org,fs@opera.com

Review-Url: https://codereview.chromium.org/2754703003
Cr-Commit-Position: refs/heads/master@{#457498}
parent 38c96095
......@@ -114,6 +114,8 @@ class CSSGradientValue : public CSSImageGeneratorValue {
DECLARE_TRACE_AFTER_DISPATCH();
struct GradientDesc;
protected:
CSSGradientValue(ClassType classType,
CSSGradientRepeat repeat,
......@@ -123,10 +125,10 @@ class CSSGradientValue : public CSSImageGeneratorValue {
m_gradientType(gradientType),
m_repeating(repeat == Repeating) {}
void addStops(Gradient*,
void addStops(GradientDesc&,
const CSSToLengthConversionData&,
const LayoutObject&);
void addDeprecatedStops(Gradient*, const LayoutObject&);
void addDeprecatedStops(GradientDesc&, const LayoutObject&);
// Resolve points/radii to front end values.
FloatPoint computeEndPoint(CSSValue*,
......
......@@ -96,37 +96,9 @@ class PLATFORM_EXPORT Gradient : public RefCounted<Gradient> {
const FloatPoint& p0() const { return m_p0; }
const FloatPoint& p1() const { return m_p1; }
void setP0(const FloatPoint& p) {
if (m_p0 == p)
return;
m_p0 = p;
}
void setP1(const FloatPoint& p) {
if (m_p1 == p)
return;
m_p1 = p;
}
float startRadius() const { return m_r0; }
float endRadius() const { return m_r1; }
void setStartRadius(float r) {
if (m_r0 == r)
return;
m_r0 = r;
}
void setEndRadius(float r) {
if (m_r1 == r)
return;
m_r1 = r;
}
void applyToFlags(PaintFlags&, const SkMatrix& localMatrix);
GradientSpreadMethod spreadMethod() const { return m_spreadMethod; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment