| Index: Source/core/platform/graphics/StrokeData.h
|
| diff --git a/Source/core/platform/graphics/StrokeData.h b/Source/core/platform/graphics/StrokeData.h
|
| index 1cdb4bd77e0119d4ccc1323c0ef680cf9663800c..5dbad85391b799adb44b07f4655b301f3435faa5 100644
|
| --- a/Source/core/platform/graphics/StrokeData.h
|
| +++ b/Source/core/platform/graphics/StrokeData.h
|
| @@ -29,51 +29,27 @@
|
| #ifndef StrokeData_h
|
| #define StrokeData_h
|
|
|
| +#include "core/platform/graphics/Color.h"
|
| #include "core/platform/graphics/DashArray.h"
|
| -#include "core/platform/graphics/Gradient.h"
|
| #include "core/platform/graphics/GraphicsTypes.h"
|
| -#include "core/platform/graphics/Pattern.h"
|
| +#include "third_party/skia/include/core/SkPaint.h"
|
| +#include "wtf/PassRefPtr.h"
|
| +#include "wtf/RefPtr.h"
|
|
|
| -#include "third_party/skia/include/core/SkColorPriv.h"
|
| -#include "third_party/skia/include/effects/SkDashPathEffect.h"
|
| -
|
| -#include "wtf/PassOwnPtr.h"
|
| +class SkDashPathEffect;
|
|
|
| namespace WebCore {
|
|
|
| +class Gradient;
|
| +class Pattern;
|
| +
|
| // Encapsulates stroke painting information.
|
| // It is pulled out of GraphicsContextState to enable other methods to use it.
|
| class StrokeData {
|
| public:
|
| - StrokeData()
|
| - : m_style(SolidStroke)
|
| - , m_thickness(0)
|
| - , m_color(Color::black)
|
| - , m_lineCap(SkPaint::kDefault_Cap)
|
| - , m_lineJoin(SkPaint::kDefault_Join)
|
| - , m_miterLimit(4)
|
| - , m_dash(0)
|
| - {
|
| - }
|
| -
|
| - StrokeData(const StrokeData& other)
|
| - : m_style(other.m_style)
|
| - , m_thickness(other.m_thickness)
|
| - , m_color(other.m_color)
|
| - , m_gradient(other.m_gradient)
|
| - , m_pattern(other.m_pattern)
|
| - , m_lineCap(other.m_lineCap)
|
| - , m_lineJoin(other.m_lineJoin)
|
| - , m_miterLimit(other.m_miterLimit)
|
| - , m_dash(other.m_dash)
|
| - {
|
| - SkSafeRef(m_dash);
|
| - }
|
| -
|
| - ~StrokeData()
|
| - {
|
| - SkSafeUnref(m_dash);
|
| - }
|
| + StrokeData();
|
| + StrokeData(const StrokeData& other);
|
| + ~StrokeData();
|
|
|
| StrokeStyle style() const { return m_style; }
|
| void setStyle(const StrokeStyle style) { m_style = style; }
|
| @@ -82,15 +58,13 @@ public:
|
| void setThickness(const float thickness) { m_thickness = thickness; }
|
|
|
| Color color() const { return m_color; }
|
| - void setColor(const Color& color) { m_color = color; }
|
| + void setColor(const Color&);
|
|
|
| Gradient* gradient() const { return m_gradient.get(); }
|
| - void setGradient(const PassRefPtr<Gradient> gradient) { m_gradient = gradient; }
|
| - void clearGradient() { m_gradient.clear(); }
|
| + void setGradient(PassRefPtr<Gradient>);
|
|
|
| Pattern* pattern() const { return m_pattern.get(); }
|
| - void setPattern(const PassRefPtr<Pattern> pattern) { m_pattern = pattern; }
|
| - void clearPattern() { m_pattern.clear(); }
|
| + void setPattern(PassRefPtr<Pattern>);
|
|
|
| LineCap lineCap() const { return (LineCap)m_lineCap; }
|
| void setLineCap(const LineCap cap) { m_lineCap = (SkPaint::Cap)cap; }
|
|
|