| Index: Source/core/platform/graphics/GraphicsContext.h
|
| diff --git a/Source/core/platform/graphics/GraphicsContext.h b/Source/core/platform/graphics/GraphicsContext.h
|
| index 11d16d2d5eb4512f23bcce79116bb33738a59c34..04abeb7b0dc208dcf0f869dd8323414f4d3a59f7 100644
|
| --- a/Source/core/platform/graphics/GraphicsContext.h
|
| +++ b/Source/core/platform/graphics/GraphicsContext.h
|
| @@ -28,15 +28,16 @@
|
| #ifndef GraphicsContext_h
|
| #define GraphicsContext_h
|
|
|
| -#include "core/platform/chromium/TraceEvent.h"
|
| +#include "core/platform/graphics/AnnotationMode.h"
|
| +#include "core/platform/graphics/CustomFontNotReadyAction.h"
|
| #include "core/platform/graphics/DashArray.h"
|
| #include "core/platform/graphics/DrawLooper.h"
|
| #include "core/platform/graphics/FloatRect.h"
|
| -#include "core/platform/graphics/Font.h"
|
| -#include "core/platform/graphics/GraphicsContextAnnotation.h"
|
| #include "core/platform/graphics/GraphicsContextState.h"
|
| -#include "core/platform/graphics/ImageBuffer.h"
|
| +#include "core/platform/graphics/Image.h"
|
| #include "core/platform/graphics/ImageOrientation.h"
|
| +#include "core/platform/graphics/RoundedRect.h"
|
| +#include "core/platform/graphics/WindRule.h"
|
| #include "core/platform/graphics/skia/OpaqueRegionSkia.h"
|
|
|
| #include <wtf/Noncopyable.h>
|
| @@ -44,6 +45,7 @@
|
|
|
| class SkBitmap;
|
| class SkDevice;
|
| +class SkDrawLooper;
|
| class SkPaint;
|
| class SkPath;
|
| class SkRRect;
|
| @@ -51,8 +53,13 @@ struct SkRect;
|
|
|
| namespace WebCore {
|
|
|
| +class Font;
|
| +class GraphicsContextAnnotation;
|
| class ImageBuffer;
|
| class KURL;
|
| +class Path;
|
| +class TextRun;
|
| +class TextRunPaintInfo;
|
|
|
| class GraphicsContext {
|
| WTF_MAKE_NONCOPYABLE(GraphicsContext); WTF_MAKE_FAST_ALLOCATED;
|
| @@ -101,7 +108,8 @@ public:
|
| void setStrokeStyle(StrokeStyle style) { m_state->m_strokeData.setStyle(style); }
|
|
|
| Color strokeColor() const { return m_state->m_strokeData.color(); }
|
| - void setStrokeColor(const Color&);
|
| + void setStrokeColor(const Color& color) { m_state->m_strokeData.setColor(color); }
|
| + SkColor effectiveStrokeColor() const;
|
|
|
| Pattern* strokePattern() const { return m_state->m_strokeData.pattern(); }
|
| void setStrokePattern(PassRefPtr<Pattern>);
|
| @@ -119,7 +127,7 @@ public:
|
|
|
| Color fillColor() const { return m_state->m_fillColor; }
|
| void setFillColor(const Color&);
|
| - SkColor effectiveFillColor() const { return m_state->applyAlpha(m_state->m_fillColor.rgb()); }
|
| + SkColor effectiveFillColor() const;
|
|
|
| void setFillPattern(PassRefPtr<Pattern>);
|
| Pattern* fillPattern() const { return m_state->m_fillPattern.get(); }
|
| @@ -128,7 +136,6 @@ public:
|
| Gradient* fillGradient() const { return m_state->m_fillGradient.get(); }
|
|
|
| SkDrawLooper* drawLooper() const { return m_state->m_looper; }
|
| - SkColor effectiveStrokeColor() const { return m_state->applyAlpha(m_state->m_strokeData.color().rgb()); }
|
|
|
| int getNormalizedAlpha() const;
|
|
|
| @@ -281,7 +288,7 @@ public:
|
|
|
| void drawText(const Font&, const TextRunPaintInfo&, const FloatPoint&);
|
| void drawEmphasisMarks(const Font&, const TextRunPaintInfo&, const AtomicString& mark, const FloatPoint&);
|
| - void drawBidiText(const Font&, const TextRunPaintInfo&, const FloatPoint&, Font::CustomFontNotReadyAction = Font::DoNotPaintIfFontNotReady);
|
| + void drawBidiText(const Font&, const TextRunPaintInfo&, const FloatPoint&, CustomFontNotReadyAction = DoNotPaintIfFontNotReady);
|
| void drawHighlightForText(const Font&, const TextRun&, const FloatPoint&, int h, const Color& backgroundColor, int from = 0, int to = -1);
|
|
|
| void drawLineForText(const FloatPoint&, float width, bool printing);
|
| @@ -327,9 +334,8 @@ public:
|
| // ---------- Transformation methods -----------------
|
| enum IncludeDeviceScale { DefinitelyIncludeDeviceScale, PossiblyIncludeDeviceScale };
|
| AffineTransform getCTM(IncludeDeviceScale includeScale = PossiblyIncludeDeviceScale) const;
|
| - void concatCTM(const AffineTransform& affine) { concat(affine); }
|
| - void setCTM(const AffineTransform& affine) { setMatrix(affine); }
|
| - void setMatrix(const SkMatrix&);
|
| + void concatCTM(const AffineTransform&);
|
| + void setCTM(const AffineTransform&);
|
|
|
| void scale(const FloatSize&);
|
| void rotate(float angleInRadians);
|
| @@ -406,8 +412,6 @@ private:
|
| bool clipPath(const SkPath&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op);
|
| bool clipRRect(const SkRRect&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op);
|
|
|
| - bool concat(const SkMatrix&);
|
| -
|
| // Used when restoring and the state has an image clip. Only shows the pixels in
|
| // m_canvas that are also in imageBuffer.
|
| // The clipping rectangle is given in absolute coordinates.
|
|
|