<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[191118] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/191118">191118</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2015-10-15 10:23:32 -0700 (Thu, 15 Oct 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Un-indent contents of the WebCore namespace
in GraphicsContext.h. No code changes.
* platform/graphics/GraphicsContext.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContexth">trunk/Source/WebCore/platform/graphics/GraphicsContext.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191117 => 191118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-15 17:20:10 UTC (rev 191117)
+++ trunk/Source/WebCore/ChangeLog        2015-10-15 17:23:32 UTC (rev 191118)
</span><span class="lines">@@ -1,3 +1,10 @@
</span><ins>+2015-10-15 Simon Fraser <simon.fraser@apple.com>
+
+ Un-indent contents of the WebCore namespace
+ in GraphicsContext.h. No code changes.
+
+ * platform/graphics/GraphicsContext.h:
+
</ins><span class="cx"> 2015-10-14 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Move ImageBuffer:clip() into GraphicsContextCG
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (191117 => 191118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2015-10-15 17:20:10 UTC (rev 191117)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2015-10-15 17:23:32 UTC (rev 191118)
</span><span class="lines">@@ -64,551 +64,550 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> #if USE(WINGDI)
</span><del>- class SharedBitmap;
- class Font;
- class GlyphBuffer;
</del><ins>+class SharedBitmap;
+class Font;
+class GlyphBuffer;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- const int cMisspellingLineThickness = 3;
- const int cMisspellingLinePatternWidth = 4;
- const int cMisspellingLinePatternGapWidth = 1;
</del><ins>+const int cMisspellingLineThickness = 3;
+const int cMisspellingLinePatternWidth = 4;
+const int cMisspellingLinePatternGapWidth = 1;
</ins><span class="cx">
</span><del>- class AffineTransform;
- class FloatRoundedRect;
- class Gradient;
- class GraphicsContextPlatformPrivate;
- class ImageBuffer;
- class IntRect;
- class RoundedRect;
- class URL;
- class GraphicsContext3D;
- class TextRun;
- class TransformationMatrix;
</del><ins>+class AffineTransform;
+class FloatRoundedRect;
+class Gradient;
+class GraphicsContextPlatformPrivate;
+class ImageBuffer;
+class IntRect;
+class RoundedRect;
+class URL;
+class GraphicsContext3D;
+class TextRun;
+class TransformationMatrix;
</ins><span class="cx">
</span><del>- enum TextDrawingMode {
- TextModeFill = 1 << 0,
- TextModeStroke = 1 << 1,
</del><ins>+enum TextDrawingMode {
+ TextModeFill = 1 << 0,
+ TextModeStroke = 1 << 1,
</ins><span class="cx"> #if ENABLE(LETTERPRESS)
</span><del>- TextModeLetterpress = 1 << 2,
</del><ins>+ TextModeLetterpress = 1 << 2,
</ins><span class="cx"> #endif
</span><del>- };
- typedef unsigned TextDrawingModeFlags;
</del><ins>+};
+typedef unsigned TextDrawingModeFlags;
</ins><span class="cx">
</span><del>- enum StrokeStyle {
- NoStroke,
- SolidStroke,
- DottedStroke,
- DashedStroke,
- DoubleStroke,
- WavyStroke,
- };
</del><ins>+enum StrokeStyle {
+ NoStroke,
+ SolidStroke,
+ DottedStroke,
+ DashedStroke,
+ DoubleStroke,
+ WavyStroke,
+};
</ins><span class="cx">
</span><del>- enum InterpolationQuality {
- InterpolationDefault,
- InterpolationNone,
- InterpolationLow,
- InterpolationMedium,
- InterpolationHigh
- };
</del><ins>+enum InterpolationQuality {
+ InterpolationDefault,
+ InterpolationNone,
+ InterpolationLow,
+ InterpolationMedium,
+ InterpolationHigh
+};
</ins><span class="cx">
</span><del>- struct GraphicsContextState {
- GraphicsContextState()
- : shouldAntialias(true)
- , shouldSmoothFonts(true)
- , antialiasedFontDilationEnabled(true)
- , shouldSubpixelQuantizeFonts(true)
- , paintingDisabled(false)
- , shadowsIgnoreTransforms(false)
</del><ins>+struct GraphicsContextState {
+ GraphicsContextState()
+ : shouldAntialias(true)
+ , shouldSmoothFonts(true)
+ , antialiasedFontDilationEnabled(true)
+ , shouldSubpixelQuantizeFonts(true)
+ , paintingDisabled(false)
+ , shadowsIgnoreTransforms(false)
</ins><span class="cx"> #if USE(CG)
</span><del>- // Core Graphics incorrectly renders shadows with radius > 8px (<rdar://problem/8103442>),
- // but we need to preserve this buggy behavior for canvas and -webkit-box-shadow.
- , shadowsUseLegacyRadius(false)
</del><ins>+ // Core Graphics incorrectly renders shadows with radius > 8px (<rdar://problem/8103442>),
+ // but we need to preserve this buggy behavior for canvas and -webkit-box-shadow.
+ , shadowsUseLegacyRadius(false)
</ins><span class="cx"> #endif
</span><del>- , drawLuminanceMask(false)
- {
- }
</del><ins>+ , drawLuminanceMask(false)
+ {
+ }
</ins><span class="cx">
</span><del>- RefPtr<Gradient> strokeGradient;
- RefPtr<Pattern> strokePattern;
-
- RefPtr<Gradient> fillGradient;
- RefPtr<Pattern> fillPattern;
</del><ins>+ RefPtr<Gradient> strokeGradient;
+ RefPtr<Pattern> strokePattern;
+
+ RefPtr<Gradient> fillGradient;
+ RefPtr<Pattern> fillPattern;
</ins><span class="cx">
</span><del>- FloatSize shadowOffset;
</del><ins>+ FloatSize shadowOffset;
</ins><span class="cx">
</span><del>- float strokeThickness { 0 };
- float shadowBlur { 0 };
</del><ins>+ float strokeThickness { 0 };
+ float shadowBlur { 0 };
</ins><span class="cx">
</span><del>- TextDrawingModeFlags textDrawingMode { TextModeFill };
</del><ins>+ TextDrawingModeFlags textDrawingMode { TextModeFill };
</ins><span class="cx">
</span><del>- Color strokeColor { Color::black };
- Color fillColor { Color::black };
- Color shadowColor;
</del><ins>+ Color strokeColor { Color::black };
+ Color fillColor { Color::black };
+ Color shadowColor;
</ins><span class="cx">
</span><del>- StrokeStyle strokeStyle { SolidStroke };
- WindRule fillRule { RULE_NONZERO };
</del><ins>+ StrokeStyle strokeStyle { SolidStroke };
+ WindRule fillRule { RULE_NONZERO };
</ins><span class="cx">
</span><del>- ColorSpace strokeColorSpace { ColorSpaceDeviceRGB };
- ColorSpace fillColorSpace { ColorSpaceDeviceRGB };
- ColorSpace shadowColorSpace { ColorSpaceDeviceRGB };
</del><ins>+ ColorSpace strokeColorSpace { ColorSpaceDeviceRGB };
+ ColorSpace fillColorSpace { ColorSpaceDeviceRGB };
+ ColorSpace shadowColorSpace { ColorSpaceDeviceRGB };
</ins><span class="cx">
</span><del>- float alpha { 1 };
- CompositeOperator compositeOperator { CompositeSourceOver };
- BlendMode blendMode { BlendModeNormal };
</del><ins>+ float alpha { 1 };
+ CompositeOperator compositeOperator { CompositeSourceOver };
+ BlendMode blendMode { BlendModeNormal };
</ins><span class="cx">
</span><del>- bool shouldAntialias : 1;
- bool shouldSmoothFonts : 1;
- bool antialiasedFontDilationEnabled : 1;
- bool shouldSubpixelQuantizeFonts : 1;
- bool paintingDisabled : 1;
- bool shadowsIgnoreTransforms : 1;
</del><ins>+ bool shouldAntialias : 1;
+ bool shouldSmoothFonts : 1;
+ bool antialiasedFontDilationEnabled : 1;
+ bool shouldSubpixelQuantizeFonts : 1;
+ bool paintingDisabled : 1;
+ bool shadowsIgnoreTransforms : 1;
</ins><span class="cx"> #if USE(CG)
</span><del>- bool shadowsUseLegacyRadius : 1;
</del><ins>+ bool shadowsUseLegacyRadius : 1;
</ins><span class="cx"> #endif
</span><del>- bool drawLuminanceMask : 1;
- };
</del><ins>+ bool drawLuminanceMask : 1;
+};
</ins><span class="cx">
</span><del>- struct ImagePaintingOptions {
- ImagePaintingOptions(CompositeOperator compositeOperator = CompositeSourceOver, BlendMode blendMode = BlendModeNormal, ImageOrientationDescription orientationDescription = ImageOrientationDescription(), bool useLowQualityScale = false)
- : m_compositeOperator(compositeOperator)
- , m_blendMode(blendMode)
- , m_orientationDescription(orientationDescription)
- , m_useLowQualityScale(useLowQualityScale)
- {
- }
</del><ins>+struct ImagePaintingOptions {
+ ImagePaintingOptions(CompositeOperator compositeOperator = CompositeSourceOver, BlendMode blendMode = BlendModeNormal, ImageOrientationDescription orientationDescription = ImageOrientationDescription(), bool useLowQualityScale = false)
+ : m_compositeOperator(compositeOperator)
+ , m_blendMode(blendMode)
+ , m_orientationDescription(orientationDescription)
+ , m_useLowQualityScale(useLowQualityScale)
+ {
+ }
</ins><span class="cx">
</span><del>- ImagePaintingOptions(ImageOrientationDescription orientationDescription, bool useLowQualityScale = false, CompositeOperator compositeOperator = CompositeSourceOver, BlendMode blendMode = BlendModeNormal)
- : m_compositeOperator(compositeOperator)
- , m_blendMode(blendMode)
- , m_orientationDescription(orientationDescription)
- , m_useLowQualityScale(useLowQualityScale)
- {
- }
</del><ins>+ ImagePaintingOptions(ImageOrientationDescription orientationDescription, bool useLowQualityScale = false, CompositeOperator compositeOperator = CompositeSourceOver, BlendMode blendMode = BlendModeNormal)
+ : m_compositeOperator(compositeOperator)
+ , m_blendMode(blendMode)
+ , m_orientationDescription(orientationDescription)
+ , m_useLowQualityScale(useLowQualityScale)
+ {
+ }
</ins><span class="cx">
</span><del>- ImagePaintingOptions(bool useLowQualityScale, ImageOrientationDescription orientationDescription = ImageOrientationDescription(), CompositeOperator compositeOperator = CompositeSourceOver, BlendMode blendMode = BlendModeNormal)
- : m_compositeOperator(compositeOperator)
- , m_blendMode(blendMode)
- , m_orientationDescription(orientationDescription)
- , m_useLowQualityScale(useLowQualityScale)
- {
- }
</del><ins>+ ImagePaintingOptions(bool useLowQualityScale, ImageOrientationDescription orientationDescription = ImageOrientationDescription(), CompositeOperator compositeOperator = CompositeSourceOver, BlendMode blendMode = BlendModeNormal)
+ : m_compositeOperator(compositeOperator)
+ , m_blendMode(blendMode)
+ , m_orientationDescription(orientationDescription)
+ , m_useLowQualityScale(useLowQualityScale)
+ {
+ }
</ins><span class="cx">
</span><del>- CompositeOperator m_compositeOperator;
- BlendMode m_blendMode;
- ImageOrientationDescription m_orientationDescription;
- bool m_useLowQualityScale;
- };
</del><ins>+ CompositeOperator m_compositeOperator;
+ BlendMode m_blendMode;
+ ImageOrientationDescription m_orientationDescription;
+ bool m_useLowQualityScale;
+};
</ins><span class="cx">
</span><del>- class GraphicsContext {
- WTF_MAKE_NONCOPYABLE(GraphicsContext); WTF_MAKE_FAST_ALLOCATED;
- public:
- WEBCORE_EXPORT GraphicsContext(PlatformGraphicsContext*);
- WEBCORE_EXPORT ~GraphicsContext();
</del><ins>+class GraphicsContext {
+ WTF_MAKE_NONCOPYABLE(GraphicsContext); WTF_MAKE_FAST_ALLOCATED;
+public:
+ WEBCORE_EXPORT GraphicsContext(PlatformGraphicsContext*);
+ WEBCORE_EXPORT ~GraphicsContext();
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT PlatformGraphicsContext* platformContext() const;
</del><ins>+ WEBCORE_EXPORT PlatformGraphicsContext* platformContext() const;
</ins><span class="cx">
</span><del>- void setStrokeThickness(float);
- float strokeThickness() const { return m_state.strokeThickness; }
</del><ins>+ void setStrokeThickness(float);
+ float strokeThickness() const { return m_state.strokeThickness; }
</ins><span class="cx">
</span><del>- void setStrokeStyle(StrokeStyle);
- StrokeStyle strokeStyle() const { return m_state.strokeStyle; }
</del><ins>+ void setStrokeStyle(StrokeStyle);
+ StrokeStyle strokeStyle() const { return m_state.strokeStyle; }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void setStrokeColor(const Color&, ColorSpace);
- Color strokeColor() const { return m_state.strokeColor; }
- ColorSpace strokeColorSpace() const { return m_state.strokeColorSpace; }
</del><ins>+ WEBCORE_EXPORT void setStrokeColor(const Color&, ColorSpace);
+ Color strokeColor() const { return m_state.strokeColor; }
+ ColorSpace strokeColorSpace() const { return m_state.strokeColorSpace; }
</ins><span class="cx">
</span><del>- void setStrokePattern(Ref<Pattern>&&);
- Pattern* strokePattern() const { return m_state.strokePattern.get(); }
</del><ins>+ void setStrokePattern(Ref<Pattern>&&);
+ Pattern* strokePattern() const { return m_state.strokePattern.get(); }
</ins><span class="cx">
</span><del>- void setStrokeGradient(Ref<Gradient>&&);
- Gradient* strokeGradient() const { return m_state.strokeGradient.get(); }
</del><ins>+ void setStrokeGradient(Ref<Gradient>&&);
+ Gradient* strokeGradient() const { return m_state.strokeGradient.get(); }
</ins><span class="cx">
</span><del>- void setFillRule(WindRule fillRule) { m_state.fillRule = fillRule; }
- WindRule fillRule() const { return m_state.fillRule; }
-
- WEBCORE_EXPORT void setFillColor(const Color&, ColorSpace);
- Color fillColor() const { return m_state.fillColor; }
- ColorSpace fillColorSpace() const { return m_state.fillColorSpace; }
</del><ins>+ void setFillRule(WindRule fillRule) { m_state.fillRule = fillRule; }
+ WindRule fillRule() const { return m_state.fillRule; }
</ins><span class="cx">
</span><del>- void setFillPattern(Ref<Pattern>&&);
- Pattern* fillPattern() const { return m_state.fillPattern.get(); }
</del><ins>+ WEBCORE_EXPORT void setFillColor(const Color&, ColorSpace);
+ Color fillColor() const { return m_state.fillColor; }
+ ColorSpace fillColorSpace() const { return m_state.fillColorSpace; }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void setFillGradient(Ref<Gradient>&&);
- Gradient* fillGradient() const { return m_state.fillGradient.get(); }
</del><ins>+ void setFillPattern(Ref<Pattern>&&);
+ Pattern* fillPattern() const { return m_state.fillPattern.get(); }
</ins><span class="cx">
</span><del>- void setShadowsIgnoreTransforms(bool shadowsIgnoreTransforms) { m_state.shadowsIgnoreTransforms = shadowsIgnoreTransforms; }
- bool shadowsIgnoreTransforms() const { return m_state.shadowsIgnoreTransforms; }
</del><ins>+ WEBCORE_EXPORT void setFillGradient(Ref<Gradient>&&);
+ Gradient* fillGradient() const { return m_state.fillGradient.get(); }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void setShouldAntialias(bool);
- bool shouldAntialias() const { return m_state.shouldAntialias; }
</del><ins>+ void setShadowsIgnoreTransforms(bool shadowsIgnoreTransforms) { m_state.shadowsIgnoreTransforms = shadowsIgnoreTransforms; }
+ bool shadowsIgnoreTransforms() const { return m_state.shadowsIgnoreTransforms; }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void setAntialiasedFontDilationEnabled(bool);
- bool antialiasedFontDilationEnabled() const { return m_state.antialiasedFontDilationEnabled; }
</del><ins>+ WEBCORE_EXPORT void setShouldAntialias(bool);
+ bool shouldAntialias() const { return m_state.shouldAntialias; }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void setShouldSmoothFonts(bool);
- bool shouldSmoothFonts() const { return m_state.shouldSmoothFonts; }
</del><ins>+ WEBCORE_EXPORT void setAntialiasedFontDilationEnabled(bool);
+ bool antialiasedFontDilationEnabled() const { return m_state.antialiasedFontDilationEnabled; }
</ins><span class="cx">
</span><del>- // Normally CG enables subpixel-quantization because it improves the performance of aligning glyphs.
- // In some cases we have to disable to to ensure a high-quality output of the glyphs.
- void setShouldSubpixelQuantizeFonts(bool shouldSubpixelQuantizeFonts) { m_state.shouldSubpixelQuantizeFonts = shouldSubpixelQuantizeFonts; }
- bool shouldSubpixelQuantizeFonts() const { return m_state.shouldSubpixelQuantizeFonts; }
</del><ins>+ WEBCORE_EXPORT void setShouldSmoothFonts(bool);
+ bool shouldSmoothFonts() const { return m_state.shouldSmoothFonts; }
</ins><span class="cx">
</span><del>- const GraphicsContextState& state() const { return m_state; }
</del><ins>+ // Normally CG enables subpixel-quantization because it improves the performance of aligning glyphs.
+ // In some cases we have to disable to to ensure a high-quality output of the glyphs.
+ void setShouldSubpixelQuantizeFonts(bool shouldSubpixelQuantizeFonts) { m_state.shouldSubpixelQuantizeFonts = shouldSubpixelQuantizeFonts; }
+ bool shouldSubpixelQuantizeFonts() const { return m_state.shouldSubpixelQuantizeFonts; }
</ins><span class="cx">
</span><ins>+ const GraphicsContextState& state() const { return m_state; }
+
</ins><span class="cx"> #if USE(CG)
</span><del>- void applyStrokePattern();
- void applyFillPattern();
- void drawPath(const Path&);
</del><ins>+ void applyStrokePattern();
+ void applyFillPattern();
+ void drawPath(const Path&);
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void drawNativeImage(PassNativeImagePtr, const FloatSize& selfSize, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, ImageOrientation = DefaultImageOrientation);
</del><ins>+ WEBCORE_EXPORT void drawNativeImage(PassNativeImagePtr, const FloatSize& selfSize, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, ImageOrientation = DefaultImageOrientation);
</ins><span class="cx">
</span><del>- void clipToNativeImage(PassNativeImagePtr, const FloatRect& destRect, const FloatSize& bufferSize);
</del><ins>+ void clipToNativeImage(PassNativeImagePtr, const FloatRect& destRect, const FloatSize& bufferSize);
</ins><span class="cx">
</span><del>- // Allow font smoothing (LCD antialiasing). Not part of the graphics state.
- void setAllowsFontSmoothing(bool);
-
- WEBCORE_EXPORT void setIsCALayerContext(bool);
- bool isCALayerContext() const;
</del><ins>+ // Allow font smoothing (LCD antialiasing). Not part of the graphics state.
+ void setAllowsFontSmoothing(bool);
+
+ WEBCORE_EXPORT void setIsCALayerContext(bool);
+ bool isCALayerContext() const;
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void setIsAcceleratedContext(bool);
</del><ins>+ WEBCORE_EXPORT void setIsAcceleratedContext(bool);
</ins><span class="cx"> #endif
</span><del>- bool isAcceleratedContext() const;
- RenderingMode renderingMode() const { return isAcceleratedContext() ? Accelerated : Unaccelerated; }
</del><ins>+ bool isAcceleratedContext() const;
+ RenderingMode renderingMode() const { return isAcceleratedContext() ? Accelerated : Unaccelerated; }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void save();
- WEBCORE_EXPORT void restore();
</del><ins>+ WEBCORE_EXPORT void save();
+ WEBCORE_EXPORT void restore();
</ins><span class="cx">
</span><del>- // These draw methods will do both stroking and filling.
- // FIXME: ...except drawRect(), which fills properly but always strokes
- // using a 1-pixel stroke inset from the rect borders (of the correct
- // stroke color).
- void drawRect(const FloatRect&, float borderThickness = 1);
- void drawLine(const FloatPoint&, const FloatPoint&);
</del><ins>+ // These draw methods will do both stroking and filling.
+ // FIXME: ...except drawRect(), which fills properly but always strokes
+ // using a 1-pixel stroke inset from the rect borders (of the correct
+ // stroke color).
+ void drawRect(const FloatRect&, float borderThickness = 1);
+ void drawLine(const FloatPoint&, const FloatPoint&);
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>- void drawJoinedLines(CGPoint points[], unsigned count, bool antialias, CGLineCap = kCGLineCapButt);
</del><ins>+ void drawJoinedLines(CGPoint points[], unsigned count, bool antialias, CGLineCap = kCGLineCapButt);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- void drawEllipse(const FloatRect&);
- void drawRaisedEllipse(const FloatRect&, const Color& ellipseColor, ColorSpace ellipseColorSpace, const Color& shadowColor, ColorSpace shadowColorSpace);
- void drawConvexPolygon(size_t numPoints, const FloatPoint*, bool shouldAntialias = false);
</del><ins>+ void drawEllipse(const FloatRect&);
+ void drawRaisedEllipse(const FloatRect&, const Color& ellipseColor, ColorSpace ellipseColorSpace, const Color& shadowColor, ColorSpace shadowColorSpace);
+ void drawConvexPolygon(size_t numPoints, const FloatPoint*, bool shouldAntialias = false);
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void fillPath(const Path&);
- void strokePath(const Path&);
</del><ins>+ WEBCORE_EXPORT void fillPath(const Path&);
+ void strokePath(const Path&);
</ins><span class="cx">
</span><del>- void fillEllipse(const FloatRect&);
- void strokeEllipse(const FloatRect&);
</del><ins>+ void fillEllipse(const FloatRect&);
+ void strokeEllipse(const FloatRect&);
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void fillRect(const FloatRect&);
- WEBCORE_EXPORT void fillRect(const FloatRect&, const Color&, ColorSpace);
- void fillRect(const FloatRect&, Gradient&);
- void fillRect(const FloatRect&, const Color&, ColorSpace, CompositeOperator, BlendMode = BlendModeNormal);
- void fillRoundedRect(const FloatRoundedRect&, const Color&, ColorSpace, BlendMode = BlendModeNormal);
- void fillRectWithRoundedHole(const FloatRect&, const FloatRoundedRect& roundedHoleRect, const Color&, ColorSpace);
</del><ins>+ WEBCORE_EXPORT void fillRect(const FloatRect&);
+ WEBCORE_EXPORT void fillRect(const FloatRect&, const Color&, ColorSpace);
+ void fillRect(const FloatRect&, Gradient&);
+ void fillRect(const FloatRect&, const Color&, ColorSpace, CompositeOperator, BlendMode = BlendModeNormal);
+ void fillRoundedRect(const FloatRoundedRect&, const Color&, ColorSpace, BlendMode = BlendModeNormal);
+ void fillRectWithRoundedHole(const FloatRect&, const FloatRoundedRect& roundedHoleRect, const Color&, ColorSpace);
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void clearRect(const FloatRect&);
</del><ins>+ WEBCORE_EXPORT void clearRect(const FloatRect&);
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void strokeRect(const FloatRect&, float lineWidth);
</del><ins>+ WEBCORE_EXPORT void strokeRect(const FloatRect&, float lineWidth);
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void drawImage(Image&, ColorSpace, const FloatPoint& destination, const ImagePaintingOptions& = ImagePaintingOptions());
- WEBCORE_EXPORT void drawImage(Image&, ColorSpace, const FloatRect& destination, const ImagePaintingOptions& = ImagePaintingOptions());
- void drawImage(Image&, ColorSpace, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions& = ImagePaintingOptions());
</del><ins>+ WEBCORE_EXPORT void drawImage(Image&, ColorSpace, const FloatPoint& destination, const ImagePaintingOptions& = ImagePaintingOptions());
+ WEBCORE_EXPORT void drawImage(Image&, ColorSpace, const FloatRect& destination, const ImagePaintingOptions& = ImagePaintingOptions());
+ void drawImage(Image&, ColorSpace, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions& = ImagePaintingOptions());
</ins><span class="cx">
</span><del>- void drawTiledImage(Image&, ColorSpace, const FloatRect& destination, const FloatPoint& source, const FloatSize& tileSize, const FloatSize& spacing, const ImagePaintingOptions& = ImagePaintingOptions());
- void drawTiledImage(Image&, ColorSpace, const FloatRect& destination, const FloatRect& source, const FloatSize& tileScaleFactor,
- Image::TileRule, Image::TileRule, const ImagePaintingOptions& = ImagePaintingOptions());
</del><ins>+ void drawTiledImage(Image&, ColorSpace, const FloatRect& destination, const FloatPoint& source, const FloatSize& tileSize, const FloatSize& spacing, const ImagePaintingOptions& = ImagePaintingOptions());
+ void drawTiledImage(Image&, ColorSpace, const FloatRect& destination, const FloatRect& source, const FloatSize& tileScaleFactor,
+ Image::TileRule, Image::TileRule, const ImagePaintingOptions& = ImagePaintingOptions());
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void drawImageBuffer(ImageBuffer&, ColorSpace, const FloatPoint& destination, const ImagePaintingOptions& = ImagePaintingOptions());
- void drawImageBuffer(ImageBuffer&, ColorSpace, const FloatRect& destination, const ImagePaintingOptions& = ImagePaintingOptions());
- void drawImageBuffer(ImageBuffer&, ColorSpace, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions& = ImagePaintingOptions());
</del><ins>+ WEBCORE_EXPORT void drawImageBuffer(ImageBuffer&, ColorSpace, const FloatPoint& destination, const ImagePaintingOptions& = ImagePaintingOptions());
+ void drawImageBuffer(ImageBuffer&, ColorSpace, const FloatRect& destination, const ImagePaintingOptions& = ImagePaintingOptions());
+ void drawImageBuffer(ImageBuffer&, ColorSpace, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions& = ImagePaintingOptions());
</ins><span class="cx">
</span><del>- void drawPattern(Image&, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, ColorSpace, CompositeOperator, const FloatRect& destRect, BlendMode = BlendModeNormal);
</del><ins>+ void drawPattern(Image&, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, ColorSpace, CompositeOperator, const FloatRect& destRect, BlendMode = BlendModeNormal);
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void setImageInterpolationQuality(InterpolationQuality);
- InterpolationQuality imageInterpolationQuality() const;
</del><ins>+ WEBCORE_EXPORT void setImageInterpolationQuality(InterpolationQuality);
+ InterpolationQuality imageInterpolationQuality() const;
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void clip(const IntRect&);
- WEBCORE_EXPORT void clip(const FloatRect&);
- void clipRoundedRect(const FloatRoundedRect&);
</del><ins>+ WEBCORE_EXPORT void clip(const IntRect&);
+ WEBCORE_EXPORT void clip(const FloatRect&);
+ void clipRoundedRect(const FloatRoundedRect&);
</ins><span class="cx">
</span><del>- void clipOut(const FloatRect&);
- void clipOutRoundedRect(const FloatRoundedRect&);
- void clipPath(const Path&, WindRule);
- void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias = true);
- void clipToImageBuffer(ImageBuffer&, const FloatRect&);
-
- IntRect clipBounds() const;
</del><ins>+ void clipOut(const FloatRect&);
+ void clipOutRoundedRect(const FloatRoundedRect&);
+ void clipPath(const Path&, WindRule);
+ void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias = true);
+ void clipToImageBuffer(ImageBuffer&, const FloatRect&);
+
+ IntRect clipBounds() const;
</ins><span class="cx">
</span><del>- void setTextDrawingMode(TextDrawingModeFlags);
- TextDrawingModeFlags textDrawingMode() const { return m_state.textDrawingMode; }
</del><ins>+ void setTextDrawingMode(TextDrawingModeFlags);
+ TextDrawingModeFlags textDrawingMode() const { return m_state.textDrawingMode; }
</ins><span class="cx">
</span><del>- float drawText(const FontCascade&, const TextRun&, const FloatPoint&, int from = 0, int to = -1);
- void drawGlyphs(const FontCascade&, const Font&, const GlyphBuffer&, int from, int numGlyphs, const FloatPoint&);
- void drawEmphasisMarks(const FontCascade&, const TextRun& , const AtomicString& mark, const FloatPoint&, int from = 0, int to = -1);
- void drawBidiText(const FontCascade&, const TextRun&, const FloatPoint&, FontCascade::CustomFontNotReadyAction = FontCascade::DoNotPaintIfFontNotReady);
</del><ins>+ float drawText(const FontCascade&, const TextRun&, const FloatPoint&, int from = 0, int to = -1);
+ void drawGlyphs(const FontCascade&, const Font&, const GlyphBuffer&, int from, int numGlyphs, const FloatPoint&);
+ void drawEmphasisMarks(const FontCascade&, const TextRun& , const AtomicString& mark, const FloatPoint&, int from = 0, int to = -1);
+ void drawBidiText(const FontCascade&, const TextRun&, const FloatPoint&, FontCascade::CustomFontNotReadyAction = FontCascade::DoNotPaintIfFontNotReady);
</ins><span class="cx">
</span><del>- enum RoundingMode {
- RoundAllSides,
- RoundOriginAndDimensions
- };
- FloatRect roundToDevicePixels(const FloatRect&, RoundingMode = RoundAllSides);
</del><ins>+ enum RoundingMode {
+ RoundAllSides,
+ RoundOriginAndDimensions
+ };
+ FloatRect roundToDevicePixels(const FloatRect&, RoundingMode = RoundAllSides);
</ins><span class="cx">
</span><del>- FloatRect computeLineBoundsForText(const FloatPoint&, float width, bool printing);
- WEBCORE_EXPORT void drawLineForText(const FloatPoint&, float width, bool printing, bool doubleLines = false);
- void drawLinesForText(const FloatPoint&, const DashArray& widths, bool printing, bool doubleLines = false);
- enum DocumentMarkerLineStyle {
</del><ins>+ FloatRect computeLineBoundsForText(const FloatPoint&, float width, bool printing);
+ WEBCORE_EXPORT void drawLineForText(const FloatPoint&, float width, bool printing, bool doubleLines = false);
+ void drawLinesForText(const FloatPoint&, const DashArray& widths, bool printing, bool doubleLines = false);
+ enum DocumentMarkerLineStyle {
</ins><span class="cx"> #if PLATFORM(IOS)
</span><del>- TextCheckingDictationPhraseWithAlternativesLineStyle,
</del><ins>+ TextCheckingDictationPhraseWithAlternativesLineStyle,
</ins><span class="cx"> #endif
</span><del>- DocumentMarkerSpellingLineStyle,
- DocumentMarkerGrammarLineStyle,
- DocumentMarkerAutocorrectionReplacementLineStyle,
- DocumentMarkerDictationAlternativesLineStyle
- };
- static void updateDocumentMarkerResources();
- void drawLineForDocumentMarker(const FloatPoint&, float width, DocumentMarkerLineStyle);
</del><ins>+ DocumentMarkerSpellingLineStyle,
+ DocumentMarkerGrammarLineStyle,
+ DocumentMarkerAutocorrectionReplacementLineStyle,
+ DocumentMarkerDictationAlternativesLineStyle
+ };
+ static void updateDocumentMarkerResources();
+ void drawLineForDocumentMarker(const FloatPoint&, float width, DocumentMarkerLineStyle);
</ins><span class="cx">
</span><del>- void setPaintingDisabled(bool paintingDisabled) { m_state.paintingDisabled = paintingDisabled; }
- bool paintingDisabled() const { return m_state.paintingDisabled; }
</del><ins>+ void setPaintingDisabled(bool paintingDisabled) { m_state.paintingDisabled = paintingDisabled; }
+ bool paintingDisabled() const { return m_state.paintingDisabled; }
</ins><span class="cx">
</span><del>- void setUpdatingControlTints(bool);
- bool updatingControlTints() const { return m_updatingControlTints; }
</del><ins>+ void setUpdatingControlTints(bool);
+ bool updatingControlTints() const { return m_updatingControlTints; }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void beginTransparencyLayer(float opacity);
- WEBCORE_EXPORT void endTransparencyLayer();
- bool isInTransparencyLayer() const { return (m_transparencyCount > 0) && supportsTransparencyLayers(); }
</del><ins>+ WEBCORE_EXPORT void beginTransparencyLayer(float opacity);
+ WEBCORE_EXPORT void endTransparencyLayer();
+ bool isInTransparencyLayer() const { return (m_transparencyCount > 0) && supportsTransparencyLayers(); }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void setShadow(const FloatSize&, float blur, const Color&, ColorSpace);
- // Legacy shadow blur radius is used for canvas, and -webkit-box-shadow.
- // It has different treatment of radii > 8px.
- void setLegacyShadow(const FloatSize&, float blur, const Color&, ColorSpace);
</del><ins>+ WEBCORE_EXPORT void setShadow(const FloatSize&, float blur, const Color&, ColorSpace);
+ // Legacy shadow blur radius is used for canvas, and -webkit-box-shadow.
+ // It has different treatment of radii > 8px.
+ void setLegacyShadow(const FloatSize&, float blur, const Color&, ColorSpace);
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void clearShadow();
- bool getShadow(FloatSize&, float&, Color&, ColorSpace&) const;
</del><ins>+ WEBCORE_EXPORT void clearShadow();
+ bool getShadow(FloatSize&, float&, Color&, ColorSpace&) const;
</ins><span class="cx">
</span><del>- bool hasVisibleShadow() const { return m_state.shadowColor.isValid() && m_state.shadowColor.alpha(); }
- bool hasShadow() const { return hasVisibleShadow() && (m_state.shadowBlur || m_state.shadowOffset.width() || m_state.shadowOffset.height()); }
- bool hasBlurredShadow() const { return hasVisibleShadow() && m_state.shadowBlur; }
</del><ins>+ bool hasVisibleShadow() const { return m_state.shadowColor.isValid() && m_state.shadowColor.alpha(); }
+ bool hasShadow() const { return hasVisibleShadow() && (m_state.shadowBlur || m_state.shadowOffset.width() || m_state.shadowOffset.height()); }
+ bool hasBlurredShadow() const { return hasVisibleShadow() && m_state.shadowBlur; }
</ins><span class="cx">
</span><span class="cx"> #if USE(CAIRO)
</span><del>- bool mustUseShadowBlur() const;
</del><ins>+ bool mustUseShadowBlur() const;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Color&);
- void drawFocusRing(const Path&, int width, int offset, const Color&);
</del><ins>+ void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Color&);
+ void drawFocusRing(const Path&, int width, int offset, const Color&);
</ins><span class="cx"> #if PLATFORM(MAC)
</span><del>- void drawFocusRing(const Vector<IntRect>&, int width, int offset, double timeOffset, bool& needsRedraw);
</del><ins>+ void drawFocusRing(const Vector<IntRect>&, int width, int offset, double timeOffset, bool& needsRedraw);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- void setLineCap(LineCap);
- void setLineDash(const DashArray&, float dashOffset);
- void setLineJoin(LineJoin);
- void setMiterLimit(float);
</del><ins>+ void setLineCap(LineCap);
+ void setLineDash(const DashArray&, float dashOffset);
+ void setLineJoin(LineJoin);
+ void setMiterLimit(float);
</ins><span class="cx">
</span><del>- void setAlpha(float);
- float alpha() const { return m_state.alpha; }
</del><ins>+ void setAlpha(float);
+ float alpha() const { return m_state.alpha; }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void setCompositeOperation(CompositeOperator, BlendMode = BlendModeNormal);
- CompositeOperator compositeOperation() const { return m_state.compositeOperator; }
- BlendMode blendModeOperation() const { return m_state.blendMode; }
</del><ins>+ WEBCORE_EXPORT void setCompositeOperation(CompositeOperator, BlendMode = BlendModeNormal);
+ CompositeOperator compositeOperation() const { return m_state.compositeOperator; }
+ BlendMode blendModeOperation() const { return m_state.blendMode; }
</ins><span class="cx">
</span><del>- void setDrawLuminanceMask(bool drawLuminanceMask) { m_state.drawLuminanceMask = drawLuminanceMask; }
- bool drawLuminanceMask() const { return m_state.drawLuminanceMask; }
</del><ins>+ void setDrawLuminanceMask(bool drawLuminanceMask) { m_state.drawLuminanceMask = drawLuminanceMask; }
+ bool drawLuminanceMask() const { return m_state.drawLuminanceMask; }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void clip(const Path&, WindRule = RULE_EVENODD);
</del><ins>+ WEBCORE_EXPORT void clip(const Path&, WindRule = RULE_EVENODD);
</ins><span class="cx">
</span><del>- // This clip function is used only by <canvas> code. It allows
- // implementations to handle clipping on the canvas differently since
- // the discipline is different.
- void canvasClip(const Path&, WindRule = RULE_EVENODD);
- void clipOut(const Path&);
</del><ins>+ // This clip function is used only by <canvas> code. It allows
+ // implementations to handle clipping on the canvas differently since
+ // the discipline is different.
+ void canvasClip(const Path&, WindRule = RULE_EVENODD);
+ void clipOut(const Path&);
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void scale(const FloatSize&);
- void rotate(float angleInRadians);
- void translate(const FloatSize& size) { translate(size.width(), size.height()); }
- WEBCORE_EXPORT void translate(float x, float y);
</del><ins>+ WEBCORE_EXPORT void scale(const FloatSize&);
+ void rotate(float angleInRadians);
+ void translate(const FloatSize& size) { translate(size.width(), size.height()); }
+ WEBCORE_EXPORT void translate(float x, float y);
</ins><span class="cx">
</span><del>- void setURLForRect(const URL&, const IntRect&);
</del><ins>+ void setURLForRect(const URL&, const IntRect&);
</ins><span class="cx">
</span><del>- void concatCTM(const AffineTransform&);
- void setCTM(const AffineTransform&);
</del><ins>+ void concatCTM(const AffineTransform&);
+ void setCTM(const AffineTransform&);
</ins><span class="cx">
</span><del>- enum IncludeDeviceScale { DefinitelyIncludeDeviceScale, PossiblyIncludeDeviceScale };
- AffineTransform getCTM(IncludeDeviceScale includeScale = PossiblyIncludeDeviceScale) const;
</del><ins>+ enum IncludeDeviceScale { DefinitelyIncludeDeviceScale, PossiblyIncludeDeviceScale };
+ AffineTransform getCTM(IncludeDeviceScale includeScale = PossiblyIncludeDeviceScale) const;
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(3D_TRANSFORMS) && USE(TEXTURE_MAPPER)
</span><del>- // This is needed when using accelerated-compositing in software mode, like in TextureMapper.
- void concat3DTransform(const TransformationMatrix&);
- void set3DTransform(const TransformationMatrix&);
- TransformationMatrix get3DTransform() const;
</del><ins>+ // This is needed when using accelerated-compositing in software mode, like in TextureMapper.
+ void concat3DTransform(const TransformationMatrix&);
+ void set3DTransform(const TransformationMatrix&);
+ TransformationMatrix get3DTransform() const;
</ins><span class="cx"> #endif
</span><del>- // Create an image buffer compatible with this context, with suitable resolution
- // for drawing into the buffer and then into this context.
- std::unique_ptr<ImageBuffer> createCompatibleBuffer(const FloatSize&, bool hasAlpha = true) const;
- bool isCompatibleWithBuffer(ImageBuffer&) const;
</del><ins>+ // Create an image buffer compatible with this context, with suitable resolution
+ // for drawing into the buffer and then into this context.
+ std::unique_ptr<ImageBuffer> createCompatibleBuffer(const FloatSize&, bool hasAlpha = true) const;
+ bool isCompatibleWithBuffer(ImageBuffer&) const;
</ins><span class="cx">
</span><del>- // This function applies the device scale factor to the context, making the context capable of
- // acting as a base-level context for a HiDPI environment.
- WEBCORE_EXPORT void applyDeviceScaleFactor(float);
- void platformApplyDeviceScaleFactor(float);
</del><ins>+ // This function applies the device scale factor to the context, making the context capable of
+ // acting as a base-level context for a HiDPI environment.
+ WEBCORE_EXPORT void applyDeviceScaleFactor(float);
+ void platformApplyDeviceScaleFactor(float);
</ins><span class="cx">
</span><span class="cx"> #if OS(WINDOWS)
</span><del>- HDC getWindowsContext(const IntRect&, bool supportAlphaBlend, bool mayCreateBitmap); // The passed in rect is used to create a bitmap for compositing inside transparency layers.
- void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend, bool mayCreateBitmap); // The passed in HDC should be the one handed back by getWindowsContext.
- HDC hdc() const;
</del><ins>+ HDC getWindowsContext(const IntRect&, bool supportAlphaBlend, bool mayCreateBitmap); // The passed in rect is used to create a bitmap for compositing inside transparency layers.
+ void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend, bool mayCreateBitmap); // The passed in HDC should be the one handed back by getWindowsContext.
+ HDC hdc() const;
</ins><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx"> #if USE(WINGDI)
</span><del>- void setBitmap(PassRefPtr<SharedBitmap>);
- const AffineTransform& affineTransform() const;
- AffineTransform& affineTransform();
- void resetAffineTransform();
- void fillRect(const FloatRect&, const Gradient*);
- void drawText(const Font&, const GlyphBuffer&, int from, int numGlyphs, const FloatPoint&);
- void drawFrameControl(const IntRect& rect, unsigned type, unsigned state);
- void drawFocusRect(const IntRect& rect);
- void paintTextField(const IntRect& rect, unsigned state);
- void drawBitmap(SharedBitmap*, const IntRect& dstRect, const IntRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp, BlendMode blendMode);
- void drawBitmapPattern(SharedBitmap*, const FloatRect& tileRectIn, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect, const IntSize& origSourceSize);
- void drawIcon(HICON icon, const IntRect& dstRect, UINT flags);
- void drawRoundCorner(bool newClip, RECT clipRect, RECT rectWin, HDC dc, int width, int height);
</del><ins>+ void setBitmap(PassRefPtr<SharedBitmap>);
+ const AffineTransform& affineTransform() const;
+ AffineTransform& affineTransform();
+ void resetAffineTransform();
+ void fillRect(const FloatRect&, const Gradient*);
+ void drawText(const Font&, const GlyphBuffer&, int from, int numGlyphs, const FloatPoint&);
+ void drawFrameControl(const IntRect& rect, unsigned type, unsigned state);
+ void drawFocusRect(const IntRect& rect);
+ void paintTextField(const IntRect& rect, unsigned state);
+ void drawBitmap(SharedBitmap*, const IntRect& dstRect, const IntRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp, BlendMode blendMode);
+ void drawBitmapPattern(SharedBitmap*, const FloatRect& tileRectIn, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect, const IntSize& origSourceSize);
+ void drawIcon(HICON icon, const IntRect& dstRect, UINT flags);
+ void drawRoundCorner(bool newClip, RECT clipRect, RECT rectWin, HDC dc, int width, int height);
</ins><span class="cx"> #else
</span><del>- GraphicsContext(HDC, bool hasAlpha = false); // FIXME: To be removed.
</del><ins>+ GraphicsContext(HDC, bool hasAlpha = false); // FIXME: To be removed.
</ins><span class="cx">
</span><del>- // When set to true, child windows should be rendered into this context
- // rather than allowing them just to render to the screen. Defaults to
- // false.
- // FIXME: This is a layering violation. GraphicsContext shouldn't know
- // what a "window" is. It would be much more appropriate for this flag
- // to be passed as a parameter alongside the GraphicsContext, but doing
- // that would require lots of changes in cross-platform code that we
- // aren't sure we want to make.
- void setShouldIncludeChildWindows(bool);
- bool shouldIncludeChildWindows() const;
</del><ins>+ // When set to true, child windows should be rendered into this context
+ // rather than allowing them just to render to the screen. Defaults to
+ // false.
+ // FIXME: This is a layering violation. GraphicsContext shouldn't know
+ // what a "window" is. It would be much more appropriate for this flag
+ // to be passed as a parameter alongside the GraphicsContext, but doing
+ // that would require lots of changes in cross-platform code that we
+ // aren't sure we want to make.
+ void setShouldIncludeChildWindows(bool);
+ bool shouldIncludeChildWindows() const;
</ins><span class="cx">
</span><del>- class WindowsBitmap {
- WTF_MAKE_NONCOPYABLE(WindowsBitmap);
- public:
- WindowsBitmap(HDC, const IntSize&);
- ~WindowsBitmap();
</del><ins>+ class WindowsBitmap {
+ WTF_MAKE_NONCOPYABLE(WindowsBitmap);
+ public:
+ WindowsBitmap(HDC, const IntSize&);
+ ~WindowsBitmap();
</ins><span class="cx">
</span><del>- HDC hdc() const { return m_hdc; }
- UInt8* buffer() const { return m_pixelData.buffer(); }
- unsigned bufferLength() const { return m_pixelData.bufferLength(); }
- const IntSize& size() const { return m_pixelData.size(); }
- unsigned bytesPerRow() const { return m_pixelData.bytesPerRow(); }
- unsigned short bitsPerPixel() const { return m_pixelData.bitsPerPixel(); }
- const DIBPixelData& windowsDIB() const { return m_pixelData; }
</del><ins>+ HDC hdc() const { return m_hdc; }
+ UInt8* buffer() const { return m_pixelData.buffer(); }
+ unsigned bufferLength() const { return m_pixelData.bufferLength(); }
+ const IntSize& size() const { return m_pixelData.size(); }
+ unsigned bytesPerRow() const { return m_pixelData.bytesPerRow(); }
+ unsigned short bitsPerPixel() const { return m_pixelData.bitsPerPixel(); }
+ const DIBPixelData& windowsDIB() const { return m_pixelData; }
</ins><span class="cx">
</span><del>- private:
- HDC m_hdc;
- HBITMAP m_bitmap;
- DIBPixelData m_pixelData;
- };
</del><ins>+ private:
+ HDC m_hdc;
+ HBITMAP m_bitmap;
+ DIBPixelData m_pixelData;
+ };
</ins><span class="cx">
</span><del>- std::unique_ptr<WindowsBitmap> createWindowsBitmap(const IntSize&);
- // The bitmap should be non-premultiplied.
- void drawWindowsBitmap(WindowsBitmap*, const IntPoint&);
</del><ins>+ std::unique_ptr<WindowsBitmap> createWindowsBitmap(const IntSize&);
+ // The bitmap should be non-premultiplied.
+ void drawWindowsBitmap(WindowsBitmap*, const IntPoint&);
</ins><span class="cx"> #endif
</span><span class="cx"> #else // PLATFORM(WIN)
</span><del>- bool shouldIncludeChildWindows() const { return false; }
</del><ins>+ bool shouldIncludeChildWindows() const { return false; }
</ins><span class="cx"> #endif // PLATFORM(WIN)
</span><span class="cx"> #endif // OS(WINDOWS)
</span><span class="cx">
</span><span class="cx"> #if USE(CAIRO)
</span><del>- GraphicsContext(cairo_t*);
</del><ins>+ GraphicsContext(cairo_t*);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- static void adjustLineToPixelBoundaries(FloatPoint& p1, FloatPoint& p2, float strokeWidth, StrokeStyle);
</del><ins>+ static void adjustLineToPixelBoundaries(FloatPoint& p1, FloatPoint& p2, float strokeWidth, StrokeStyle);
</ins><span class="cx">
</span><del>- private:
- void platformInit(PlatformGraphicsContext*);
- void platformDestroy();
</del><ins>+private:
+ void platformInit(PlatformGraphicsContext*);
+ void platformDestroy();
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(WIN) && !USE(WINGDI)
</span><del>- void platformInit(HDC, bool hasAlpha = false);
</del><ins>+ void platformInit(HDC, bool hasAlpha = false);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- void savePlatformState();
- void restorePlatformState();
</del><ins>+ void savePlatformState();
+ void restorePlatformState();
</ins><span class="cx">
</span><del>- void setPlatformTextDrawingMode(TextDrawingModeFlags);
</del><ins>+ void setPlatformTextDrawingMode(TextDrawingModeFlags);
</ins><span class="cx">
</span><del>- void setPlatformStrokeColor(const Color&, ColorSpace);
- void setPlatformStrokeStyle(StrokeStyle);
- void setPlatformStrokeThickness(float);
</del><ins>+ void setPlatformStrokeColor(const Color&, ColorSpace);
+ void setPlatformStrokeStyle(StrokeStyle);
+ void setPlatformStrokeThickness(float);
</ins><span class="cx">
</span><del>- void setPlatformFillColor(const Color&, ColorSpace);
</del><ins>+ void setPlatformFillColor(const Color&, ColorSpace);
</ins><span class="cx">
</span><del>- void setPlatformShouldAntialias(bool);
- void setPlatformShouldSmoothFonts(bool);
</del><ins>+ void setPlatformShouldAntialias(bool);
+ void setPlatformShouldSmoothFonts(bool);
</ins><span class="cx">
</span><del>- void setPlatformShadow(const FloatSize&, float blur, const Color&, ColorSpace);
- void clearPlatformShadow();
</del><ins>+ void setPlatformShadow(const FloatSize&, float blur, const Color&, ColorSpace);
+ void clearPlatformShadow();
</ins><span class="cx">
</span><del>- void setPlatformAlpha(float);
- void setPlatformCompositeOperation(CompositeOperator, BlendMode = BlendModeNormal);
</del><ins>+ void setPlatformAlpha(float);
+ void setPlatformCompositeOperation(CompositeOperator, BlendMode = BlendModeNormal);
</ins><span class="cx">
</span><del>- void beginPlatformTransparencyLayer(float opacity);
- void endPlatformTransparencyLayer();
- static bool supportsTransparencyLayers();
</del><ins>+ void beginPlatformTransparencyLayer(float opacity);
+ void endPlatformTransparencyLayer();
+ static bool supportsTransparencyLayers();
</ins><span class="cx">
</span><del>- void fillEllipseAsPath(const FloatRect&);
- void strokeEllipseAsPath(const FloatRect&);
</del><ins>+ void fillEllipseAsPath(const FloatRect&);
+ void strokeEllipseAsPath(const FloatRect&);
</ins><span class="cx">
</span><del>- void platformFillEllipse(const FloatRect&);
- void platformStrokeEllipse(const FloatRect&);
</del><ins>+ void platformFillEllipse(const FloatRect&);
+ void platformStrokeEllipse(const FloatRect&);
</ins><span class="cx">
</span><del>- void platformFillRoundedRect(const FloatRoundedRect&, const Color&, ColorSpace);
</del><ins>+ void platformFillRoundedRect(const FloatRoundedRect&, const Color&, ColorSpace);
</ins><span class="cx">
</span><del>- FloatRect computeLineBoundsAndAntialiasingModeForText(const FloatPoint&, float width, bool printing, bool& shouldAntialias, Color&);
</del><ins>+ FloatRect computeLineBoundsAndAntialiasingModeForText(const FloatPoint&, float width, bool printing, bool& shouldAntialias, Color&);
</ins><span class="cx">
</span><del>- GraphicsContextPlatformPrivate* m_data;
</del><ins>+ GraphicsContextPlatformPrivate* m_data;
</ins><span class="cx">
</span><del>- GraphicsContextState m_state;
- Vector<GraphicsContextState, 1> m_stack;
- bool m_updatingControlTints;
- unsigned m_transparencyCount;
- };
</del><ins>+ GraphicsContextState m_state;
+ Vector<GraphicsContextState, 1> m_stack;
+ bool m_updatingControlTints;
+ unsigned m_transparencyCount;
+};
</ins><span class="cx">
</span><del>- class GraphicsContextStateSaver {
- WTF_MAKE_FAST_ALLOCATED;
- public:
- GraphicsContextStateSaver(GraphicsContext& context, bool saveAndRestore = true)
- : m_context(context)
- , m_saveAndRestore(saveAndRestore)
- {
- if (m_saveAndRestore)
- m_context.save();
- }
-
- ~GraphicsContextStateSaver()
- {
- if (m_saveAndRestore)
- m_context.restore();
- }
-
- void save()
- {
- ASSERT(!m_saveAndRestore);
</del><ins>+class GraphicsContextStateSaver {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ GraphicsContextStateSaver(GraphicsContext& context, bool saveAndRestore = true)
+ : m_context(context)
+ , m_saveAndRestore(saveAndRestore)
+ {
+ if (m_saveAndRestore)
</ins><span class="cx"> m_context.save();
</span><del>- m_saveAndRestore = true;
- }
-
- void restore()
- {
- ASSERT(m_saveAndRestore);
</del><ins>+ }
+
+ ~GraphicsContextStateSaver()
+ {
+ if (m_saveAndRestore)
</ins><span class="cx"> m_context.restore();
</span><del>- m_saveAndRestore = false;
- }
-
- GraphicsContext* context() const { return &m_context; }
</del><ins>+ }
+
+ void save()
+ {
+ ASSERT(!m_saveAndRestore);
+ m_context.save();
+ m_saveAndRestore = true;
+ }
</ins><span class="cx">
</span><del>- private:
- GraphicsContext& m_context;
- bool m_saveAndRestore;
- };
</del><ins>+ void restore()
+ {
+ ASSERT(m_saveAndRestore);
+ m_context.restore();
+ m_saveAndRestore = false;
+ }
+
+ GraphicsContext* context() const { return &m_context; }
</ins><span class="cx">
</span><ins>+private:
+ GraphicsContext& m_context;
+ bool m_saveAndRestore;
+};
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // GraphicsContext_h
</span><del>-
</del></span></pre>
</div>
</div>
</body>
</html>