<!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>[208019] trunk</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/208019">208019</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2016-10-27 17:21:31 -0700 (Thu, 27 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[Win][Direct2D] Create a RAII Helper Class for the Render Target
https://bugs.webkit.org/show_bug.cgi?id=164005
Reviewed by Alex Christensen.
Source/WebCore:
Tested by existing SVG, image, and Canvas layout tests.
* platform/graphics/GraphicsContext.h:
* platform/graphics/win/GradientDirect2D.cpp:
(WebCore::Gradient::fill): Use new convenience helper class.
* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContext::didBeginDraw):
(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
(WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): Add an
assertion that we are in a valid state when cleaning up the graphics context.
(WebCore::GraphicsContextPlatformPrivate::clip): Clipping can only happen in a Draw operation.
Open a new BeginDraw if asked to Clip. The Begin must stay active when this method returns,
as the Clip layer is only valid during a Draw operation.
(WebCore::GraphicsContextPlatformPrivate::beginDraw): Added.
(WebCore::GraphicsContextPlatformPrivate::endDraw): Added.
(WebCore::GraphicsContext::beginDrawIfNeeded): Added.
(WebCore::GraphicsContext::endDraw): Added.
(WebCore::GraphicsContext::drawWithoutShadow): Revise to use new RenderTargetHelper class.
(WebCore::GraphicsContext::drawWithShadow): Ditto.
(WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
(WebCore::GraphicsContext::fillRectWithRoundedHole): Ditto.
(WebCore::GraphicsContext::setDidBeginDraw): Deleted.
* platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
(WebCore::GraphicsContextPlatformPrivate::didBeginDraw): Revise to use count instead of
a separate boolean.
* platform/graphics/win/ImageBufferDataDirect2D.cpp:
(WebCore::ImageBufferData::getData): Revise to use new RenderTargetHelper class.
* platform/graphics/win/NativeImageDirect2D.cpp:
(WebCore::drawNativeImage): Ditto.
* platform/graphics/win/RenderTargetHelper.h: Added.
(WebCore::RenderTargetHelper::RenderTargetHelper):
(WebCore::RenderTargetHelper::~RenderTargetHelper):
(WebCore::RenderTargetHelper::endDraw):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::nativeImage): Revise to use new RenderTargetHelper class.
Source/WebKit/win:
* WebView.cpp:
(WebView::sizeChanged): Construct RenderTarget with higher-resolution display timer.
(WebView::paintWithDirect2D): Revise to use new RenderTargetHelper class.</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>
<li><a href="#trunkSourceWebCoreplatformgraphicswinGradientDirect2Dcpp">trunk/Source/WebCore/platform/graphics/win/GradientDirect2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinGraphicsContextDirect2Dcpp">trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinGraphicsContextPlatformPrivateDirect2Dh">trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinImageBufferDataDirect2Dcpp">trunk/Source/WebCore/platform/graphics/win/ImageBufferDataDirect2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinNativeImageDirect2Dcpp">trunk/Source/WebCore/platform/graphics/win/NativeImageDirect2D.cpp</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImagecpp">trunk/Source/WebCore/svg/graphics/SVGImage.cpp</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkToolsTestWebKitAPIPlatformWincmake">trunk/Tools/TestWebKitAPI/PlatformWin.cmake</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicswinRenderTargetScopedDrawingh">trunk/Source/WebCore/platform/graphics/win/RenderTargetScopedDrawing.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208018 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-27 23:46:13 UTC (rev 208018)
+++ trunk/Source/WebCore/ChangeLog        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2016-10-25 Brent Fulgham <bfulgham@apple.com>
+
+ [Win][Direct2D] Create a RAII Helper Class for the Render Target
+ https://bugs.webkit.org/show_bug.cgi?id=164005
+
+ Reviewed by Alex Christensen.
+
+ Tested by existing SVG, image, and Canvas layout tests.
+
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/win/GradientDirect2D.cpp:
+ (WebCore::Gradient::fill): Use new convenience helper class.
+ * platform/graphics/win/GraphicsContextDirect2D.cpp:
+ (WebCore::GraphicsContext::didBeginDraw):
+ (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
+ (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): Add an
+ assertion that we are in a valid state when cleaning up the graphics context.
+ (WebCore::GraphicsContextPlatformPrivate::clip): Clipping can only happen in a Draw operation.
+ Open a new BeginDraw if asked to Clip. The Begin must stay active when this method returns,
+ as the Clip layer is only valid during a Draw operation.
+ (WebCore::GraphicsContextPlatformPrivate::beginDraw): Added.
+ (WebCore::GraphicsContextPlatformPrivate::endDraw): Added.
+ (WebCore::GraphicsContext::beginDrawIfNeeded): Added.
+ (WebCore::GraphicsContext::endDraw): Added.
+ (WebCore::GraphicsContext::drawWithoutShadow): Revise to use new RenderTargetHelper class.
+ (WebCore::GraphicsContext::drawWithShadow): Ditto.
+ (WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
+ (WebCore::GraphicsContext::fillRectWithRoundedHole): Ditto.
+ (WebCore::GraphicsContext::setDidBeginDraw): Deleted.
+ * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
+ (WebCore::GraphicsContextPlatformPrivate::didBeginDraw): Revise to use count instead of
+ a separate boolean.
+ * platform/graphics/win/ImageBufferDataDirect2D.cpp:
+ (WebCore::ImageBufferData::getData): Revise to use new RenderTargetHelper class.
+ * platform/graphics/win/NativeImageDirect2D.cpp:
+ (WebCore::drawNativeImage): Ditto.
+ * platform/graphics/win/RenderTargetHelper.h: Added.
+ (WebCore::RenderTargetHelper::RenderTargetHelper):
+ (WebCore::RenderTargetHelper::~RenderTargetHelper):
+ (WebCore::RenderTargetHelper::endDraw):
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::nativeImage): Revise to use new RenderTargetHelper class.
+
</ins><span class="cx"> 2016-10-27 Wenson Hsieh <wenson_hsieh@apple.com>
</span><span class="cx">
</span><span class="cx"> Support "insertFromDrop" and "deleteByDrag" for the InputEvent spec
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (208018 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2016-10-27 23:46:13 UTC (rev 208018)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -552,9 +552,10 @@
</span><span class="cx"> WEBCORE_EXPORT static ID2D1Factory* systemFactory();
</span><span class="cx"> WEBCORE_EXPORT static ID2D1RenderTarget* defaultRenderTarget();
</span><span class="cx">
</span><del>- WEBCORE_EXPORT void setDidBeginDraw(bool);
</del><ins>+ WEBCORE_EXPORT bool beginDrawIfNeeded();
</ins><span class="cx"> WEBCORE_EXPORT bool didBeginDraw() const;
</span><span class="cx"> D2D1_COLOR_F colorWithGlobalAlpha(const Color&) const;
</span><ins>+ WEBCORE_EXPORT void endDraw();
</ins><span class="cx">
</span><span class="cx"> ID2D1Brush* solidStrokeBrush() const;
</span><span class="cx"> ID2D1Brush* solidFillBrush() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinGradientDirect2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/GradientDirect2D.cpp (208018 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/GradientDirect2D.cpp        2016-10-27 23:46:13 UTC (rev 208018)
+++ trunk/Source/WebCore/platform/graphics/win/GradientDirect2D.cpp        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #include "FloatPoint.h"
</span><span class="cx"> #include "GraphicsContext.h"
</span><ins>+#include "RenderTargetScopedDrawing.h"
</ins><span class="cx"> #include <d2d1.h>
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="lines">@@ -120,8 +121,7 @@
</span><span class="cx"> if (!m_cachedHash || !m_gradient)
</span><span class="cx"> generateGradient(d2dContext);
</span><span class="cx">
</span><del>- if (!context->didBeginDraw())
- d2dContext->BeginDraw();
</del><ins>+ RenderTargetScopedDrawing scopedDraw(*context);
</ins><span class="cx">
</span><span class="cx"> d2dContext->SetTags(GRADIENT_DRAWING, __LINE__);
</span><span class="cx">
</span><span class="lines">@@ -128,12 +128,6 @@
</span><span class="cx"> const D2D1_RECT_F d2dRect = rect;
</span><span class="cx"> d2dContext->FillRectangle(&d2dRect, m_gradient);
</span><span class="cx">
</span><del>- if (!context->didBeginDraw()) {
- D2D1_TAG first, second;
- HRESULT hr = d2dContext->EndDraw(&first, &second);
- RELEASE_ASSERT(SUCCEEDED(hr));
- }
-
</del><span class="cx"> if (needScaling)
</span><span class="cx"> context->restore();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinGraphicsContextDirect2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp (208018 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp        2016-10-27 23:46:13 UTC (rev 208018)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include "ImageBuffer.h"
</span><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "NotImplemented.h"
</span><ins>+#include "RenderTargetScopedDrawing.h"
</ins><span class="cx"> #include "URL.h"
</span><span class="cx"> #include <d2d1.h>
</span><span class="cx"> #include <d2d1effects.h>
</span><span class="lines">@@ -98,15 +99,9 @@
</span><span class="cx"> return defaultRenderTarget;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::setDidBeginDraw(bool didBeginDraw)
-{
- RELEASE_ASSERT(m_data);
- m_data->m_didBeginDraw = didBeginDraw;
-}
-
</del><span class="cx"> bool GraphicsContext::didBeginDraw() const
</span><span class="cx"> {
</span><del>- return m_data->m_didBeginDraw;
</del><ins>+ return m_data->didBeginDraw();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void GraphicsContext::platformInit(HDC hdc, bool hasAlpha)
</span><span class="lines">@@ -277,14 +272,9 @@
</span><span class="cx"> HRESULT hr = platformContext()->CreateBitmap(pixelData.size(), pixelData.buffer(), pixelData.bytesPerRow(), &bitmapProperties, &bitmap);
</span><span class="cx"> ASSERT(SUCCEEDED(hr));
</span><span class="cx">
</span><del>- if (!didBeginDraw())
- platformContext()->BeginDraw();
-
</del><ins>+ RenderTargetScopedDrawing scopedDraw(*this);
</ins><span class="cx"> platformContext()->DrawBitmap(bitmap.get(), dstRect);
</span><span class="cx">
</span><del>- if (!didBeginDraw())
- hr = platformContext()->EndDraw();
-
</del><span class="cx"> ::DeleteDC(hdc);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -308,6 +298,19 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate(ID2D1RenderTarget* renderTarget)
+ : m_renderTarget(renderTarget)
+{
+}
+
+GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate()
+{
+ if (!m_renderTarget)
+ return;
+
+ ASSERT(!m_beginDrawCount.unsafeGet());
+}
+
</ins><span class="cx"> COMPtr<ID2D1SolidColorBrush> GraphicsContextPlatformPrivate::brushWithColor(const D2D1_COLOR_F& color)
</span><span class="cx"> {
</span><span class="cx"> RGBA32 colorKey = makeRGBA32FromFloats(color.r, color.g, color.b, color.a);
</span><span class="lines">@@ -340,6 +343,10 @@
</span><span class="cx">
</span><span class="cx"> void GraphicsContextPlatformPrivate::clip(const FloatRect& rect)
</span><span class="cx"> {
</span><ins>+ // In D2D, we can only clip in the context of a 'BeginDraw', and the clip can
+ // only live as long as the draw is happening.
+ beginDrawIfNeeded();
+
</ins><span class="cx"> if (m_renderStates.isEmpty())
</span><span class="cx"> save();
</span><span class="cx">
</span><span class="lines">@@ -354,6 +361,10 @@
</span><span class="cx">
</span><span class="cx"> void GraphicsContextPlatformPrivate::clip(ID2D1Geometry* path)
</span><span class="cx"> {
</span><ins>+ // In D2D, we can only clip in the context of a 'BeginDraw', and the clip can
+ // only live as long as the draw is happening.
+ beginDrawIfNeeded();
+
</ins><span class="cx"> ASSERT(m_renderStates.size());
</span><span class="cx"> if (!m_renderStates.size())
</span><span class="cx"> return;
</span><span class="lines">@@ -389,6 +400,17 @@
</span><span class="cx"> RELEASE_ASSERT(SUCCEEDED(hr));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void GraphicsContextPlatformPrivate::beginDrawIfNeeded()
+{
+ ASSERT(m_renderTarget.get());
+ if (didBeginDraw())
+ return;
+
+ m_renderTarget->BeginDraw();
+
+ ++m_beginDrawCount;
+}
+
</ins><span class="cx"> void GraphicsContextPlatformPrivate::endDraw()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_renderTarget.get());
</span><span class="lines">@@ -397,6 +419,8 @@
</span><span class="cx">
</span><span class="cx"> if (!SUCCEEDED(hr))
</span><span class="cx"> WTFLogAlways("Failed in GraphicsContextPlatformPrivate::endDraw: hr=%ld, first=%ld, second=%ld", hr, first, second);
</span><ins>+
+ --m_beginDrawCount;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void GraphicsContextPlatformPrivate::restore()
</span><span class="lines">@@ -493,6 +517,19 @@
</span><span class="cx"> return m_data->m_patternFillBrush.get();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool GraphicsContext::beginDrawIfNeeded()
+{
+ bool neededToBeginDraw = !m_data->didBeginDraw();
+
+ m_data->beginDrawIfNeeded();
+ return neededToBeginDraw;
+}
+
+void GraphicsContext::endDraw()
+{
+ m_data->endDraw();
+}
+
</ins><span class="cx"> void GraphicsContext::drawPattern(Image& image, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator op, BlendMode blendMode)
</span><span class="cx"> {
</span><span class="cx"> if (paintingDisabled() || !patternTransform.isInvertible())
</span><span class="lines">@@ -877,19 +914,14 @@
</span><span class="cx">
</span><span class="cx"> void GraphicsContext::drawWithoutShadow(const FloatRect& /*boundingRect*/, const std::function<void(ID2D1RenderTarget*)>& drawCommands)
</span><span class="cx"> {
</span><del>- auto context = platformContext();
-
- if (!didBeginDraw())
- context->BeginDraw();
-
- drawCommands(context);
-
- if (!didBeginDraw())
- m_data->endDraw();
</del><ins>+ RenderTargetScopedDrawing scopedDraw(*this);
+ drawCommands(platformContext());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void GraphicsContext::drawWithShadow(const FloatRect& boundingRect, const std::function<void(ID2D1RenderTarget*)>& drawCommands)
</span><span class="cx"> {
</span><ins>+ RenderTargetScopedDrawing scopedDraw(*this);
+
</ins><span class="cx"> auto context = platformContext();
</span><span class="cx">
</span><span class="cx"> // Render the current geometry to a bitmap context
</span><span class="lines">@@ -942,10 +974,7 @@
</span><span class="cx"> auto flip = D2D1::Matrix3x2F::Scale(D2D1::SizeF(1.0f, -1.0f));
</span><span class="cx"> deviceContext->SetTransform(ctm * flip * translate);
</span><span class="cx">
</span><del>- deviceContext->BeginDraw();
</del><span class="cx"> deviceContext->DrawImage(compositor.get(), D2D1_INTERPOLATION_MODE_LINEAR);
</span><del>- hr = deviceContext->EndDraw();
- ASSERT(SUCCEEDED(hr));
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void GraphicsContext::fillPath(const Path& path)
</span><span class="lines">@@ -1136,9 +1165,8 @@
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!didBeginDraw())
- context->BeginDraw();
-
</del><ins>+ RenderTargetScopedDrawing scopedDraw(*this);
+
</ins><span class="cx"> context->SetTags(1, __LINE__);
</span><span class="cx">
</span><span class="cx"> const FloatRect& r = rect.rect();
</span><span class="lines">@@ -1158,9 +1186,6 @@
</span><span class="cx"> fillPath(path);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!didBeginDraw())
- m_data->endDraw();
-
</del><span class="cx"> if (drawOwnShadow)
</span><span class="cx"> stateSaver.restore();
</span><span class="cx"> }
</span><span class="lines">@@ -1177,8 +1202,7 @@
</span><span class="cx">
</span><span class="cx"> auto context = platformContext();
</span><span class="cx">
</span><del>- if (!didBeginDraw())
- context->BeginDraw();
</del><ins>+ RenderTargetScopedDrawing scopedDraw(*this);
</ins><span class="cx">
</span><span class="cx"> context->SetTags(1, __LINE__);
</span><span class="cx">
</span><span class="lines">@@ -1208,9 +1232,6 @@
</span><span class="cx">
</span><span class="cx"> fillPath(path);
</span><span class="cx">
</span><del>- if (!didBeginDraw())
- m_data->endDraw();
-
</del><span class="cx"> if (drawOwnShadow)
</span><span class="cx"> stateSaver.restore();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinGraphicsContextPlatformPrivateDirect2Dh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h (208018 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h        2016-10-27 23:46:13 UTC (rev 208018)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include <d2d1effects.h>
</span><span class="cx"> #include <d2d1helper.h>
</span><span class="cx"> #include <windows.h>
</span><ins>+#include <wtf/CheckedArithmetic.h>
</ins><span class="cx"> #include <wtf/TinyLRUCache.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -39,10 +40,8 @@
</span><span class="cx"> class GraphicsContextPlatformPrivate {
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>- GraphicsContextPlatformPrivate(ID2D1RenderTarget* renderTarget)
- : m_renderTarget(renderTarget)
- {
- }
</del><ins>+ GraphicsContextPlatformPrivate(ID2D1RenderTarget*);
+ ~GraphicsContextPlatformPrivate();
</ins><span class="cx">
</span><span class="cx"> enum Direct2DLayerType { AxisAlignedClip, LayerClip };
</span><span class="cx">
</span><span class="lines">@@ -49,6 +48,7 @@
</span><span class="cx"> void clip(const FloatRect&);
</span><span class="cx"> void clip(const Path&);
</span><span class="cx"> void clip(ID2D1Geometry*);
</span><ins>+ void beginDrawIfNeeded();
</ins><span class="cx"> void endDraw();
</span><span class="cx"> void flush();
</span><span class="cx"> void save();
</span><span class="lines">@@ -75,11 +75,13 @@
</span><span class="cx">
</span><span class="cx"> COMPtr<ID2D1SolidColorBrush> brushWithColor(const D2D1_COLOR_F&);
</span><span class="cx">
</span><ins>+ bool didBeginDraw() const { return m_beginDrawCount.unsafeGet(); }
+
</ins><span class="cx"> HDC m_hdc { nullptr };
</span><span class="cx"> D2D1_BLEND_MODE m_blendMode { D2D1_BLEND_MODE_MULTIPLY };
</span><span class="cx"> D2D1_COMPOSITE_MODE m_compositeMode { D2D1_COMPOSITE_MODE_SOURCE_OVER };
</span><ins>+ Checked<unsigned> m_beginDrawCount { 0 };
</ins><span class="cx"> bool m_shouldIncludeChildWindows { false };
</span><del>- bool m_didBeginDraw { false };
</del><span class="cx"> bool m_strokeSyleIsDirty { false };
</span><span class="cx">
</span><span class="cx"> COMPtr<ID2D1SolidColorBrush> m_solidStrokeBrush;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinImageBufferDataDirect2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/ImageBufferDataDirect2D.cpp (208018 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/ImageBufferDataDirect2D.cpp        2016-10-27 23:46:13 UTC (rev 208018)
+++ trunk/Source/WebCore/platform/graphics/win/ImageBufferDataDirect2D.cpp        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include "HWndDC.h"
</span><span class="cx"> #include "IntRect.h"
</span><span class="cx"> #include "NotImplemented.h"
</span><ins>+#include "RenderTargetScopedDrawing.h"
</ins><span class="cx"> #include <d2d1.h>
</span><span class="cx"> #include <runtime/JSCInlines.h>
</span><span class="cx"> #include <runtime/TypedArrayInlines.h>
</span><span class="lines">@@ -63,24 +64,24 @@
</span><span class="cx"> auto bitmapDC = adoptGDIObject(::CreateCompatibleDC(windowDC));
</span><span class="cx"> HGDIOBJ oldBitmap = ::SelectObject(bitmapDC.get(), bitmap.get());
</span><span class="cx">
</span><del>- HRESULT hr;
</del><ins>+ BOOL ok = TRUE;
</ins><span class="cx">
</span><del>- COMPtr<ID2D1GdiInteropRenderTarget> gdiRenderTarget;
- hr = platformContext->QueryInterface(__uuidof(ID2D1GdiInteropRenderTarget), (void**)&gdiRenderTarget);
- if (FAILED(hr))
- return nullptr;
</del><ins>+ {
+ RenderTargetScopedDrawing scopedDraw(*context);
</ins><span class="cx">
</span><del>- platformContext->BeginDraw();
</del><ins>+ COMPtr<ID2D1GdiInteropRenderTarget> gdiRenderTarget;
+ HRESULT hr = platformContext->QueryInterface(__uuidof(ID2D1GdiInteropRenderTarget), (void**)&gdiRenderTarget);
+ if (FAILED(hr))
+ return nullptr;
</ins><span class="cx">
</span><del>- HDC hdc = nullptr;
- hr = gdiRenderTarget->GetDC(D2D1_DC_INITIALIZE_MODE_COPY, &hdc);
</del><ins>+ HDC hdc = nullptr;
+ hr = gdiRenderTarget->GetDC(D2D1_DC_INITIALIZE_MODE_COPY, &hdc);
</ins><span class="cx">
</span><del>- BOOL ok = ::BitBlt(bitmapDC.get(), 0, 0, rect.width(), rect.height(), hdc, rect.x(), rect.y(), SRCCOPY);
</del><ins>+ ok = ::BitBlt(bitmapDC.get(), 0, 0, rect.width(), rect.height(), hdc, rect.x(), rect.y(), SRCCOPY);
</ins><span class="cx">
</span><del>- hr = gdiRenderTarget->ReleaseDC(nullptr);
</del><ins>+ hr = gdiRenderTarget->ReleaseDC(nullptr);
+ }
</ins><span class="cx">
</span><del>- hr = platformContext->EndDraw();
-
</del><span class="cx"> if (!ok)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinNativeImageDirect2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/NativeImageDirect2D.cpp (208018 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/NativeImageDirect2D.cpp        2016-10-27 23:46:13 UTC (rev 208018)
+++ trunk/Source/WebCore/platform/graphics/win/NativeImageDirect2D.cpp        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "GraphicsContext.h"
</span><span class="cx"> #include "IntSize.h"
</span><span class="cx"> #include "NotImplemented.h"
</span><ins>+#include "RenderTargetScopedDrawing.h"
</ins><span class="cx"> #include <d2d1.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -85,14 +86,13 @@
</span><span class="cx">
</span><span class="cx"> float opacity = 1.0f;
</span><span class="cx">
</span><del>- if (!context.didBeginDraw())
- platformContext->BeginDraw();
</del><ins>+ bool temporaryDraw = context.beginDrawIfNeeded();
</ins><span class="cx">
</span><span class="cx"> platformContext->DrawBitmap(image.get(), destRect, opacity, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, adjustedSrcRect);
</span><span class="cx">
</span><span class="cx"> HRESULT hr = S_OK;
</span><del>- if (!context.didBeginDraw())
- hr = platformContext->EndDraw();
</del><ins>+ if (temporaryDraw)
+ context.endDraw();
</ins><span class="cx"> else
</span><span class="cx"> hr = platformContext->Flush();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinRenderTargetScopedDrawingh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/win/RenderTargetScopedDrawing.h (0 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/RenderTargetScopedDrawing.h         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/win/RenderTargetScopedDrawing.h        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "GraphicsContext.h"
+
+namespace WebCore {
+
+class RenderTargetScopedDrawing {
+ WTF_MAKE_NONCOPYABLE(RenderTargetScopedDrawing);
+public:
+ RenderTargetScopedDrawing(GraphicsContext& context)
+ : m_context(context)
+ {
+ m_drawIsScoped = context.beginDrawIfNeeded();
+ }
+
+ ~RenderTargetScopedDrawing()
+ {
+ endDraw();
+ }
+
+ void endDraw()
+ {
+ if (!m_drawIsScoped)
+ return;
+
+ m_context.endDraw();
+ m_drawIsScoped = false;
+ }
+
+private:
+ GraphicsContext& m_context;
+ bool m_drawIsScoped;
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (208018 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2016-10-27 23:46:13 UTC (rev 208018)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2006 Eric Seidel <eric@webkit.org>
</span><del>- * Copyright (C) 2008, 2009, 2015 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2008-2009, 2015-2016 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) Research In Motion Limited 2011. All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx">
</span><span class="cx"> #if USE(DIRECT2D)
</span><span class="cx"> #include "COMPtr.h"
</span><ins>+#include "RenderTargetScopedDrawing.h"
</ins><span class="cx"> #include <d2d1.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -224,15 +225,13 @@
</span><span class="cx"> HRESULT hr = platformContext->CreateCompatibleRenderTarget(IntSize(rect().size()), &nativeImageTarget);
</span><span class="cx"> ASSERT(SUCCEEDED(hr));
</span><span class="cx">
</span><del>- nativeImageTarget->BeginDraw();
</del><span class="cx"> GraphicsContext localContext(nativeImageTarget.get());
</span><del>- localContext.setDidBeginDraw(true);
</del><span class="cx">
</span><del>- draw(localContext, rect(), rect(), CompositeSourceOver, BlendModeNormal, ImageOrientationDescription());
</del><ins>+ {
+ RenderTargetScopedDrawing scopedDraw(localContext);
+ draw(localContext, rect(), rect(), CompositeSourceOver, BlendModeNormal, ImageOrientationDescription());
+ }
</ins><span class="cx">
</span><del>- hr = nativeImageTarget->Flush();
- ASSERT(SUCCEEDED(hr));
-
</del><span class="cx"> COMPtr<ID2D1Bitmap> nativeImage;
</span><span class="cx"> hr = nativeImageTarget->GetBitmap(&nativeImage);
</span><span class="cx"> ASSERT(SUCCEEDED(hr));
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (208018 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-10-27 23:46:13 UTC (rev 208018)
+++ trunk/Source/WebKit/win/ChangeLog        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-10-25 Brent Fulgham <bfulgham@apple.com>
+
+ [Win][Direct2D] Create a RAII Helper Class for the Render Target
+ https://bugs.webkit.org/show_bug.cgi?id=164005
+
+ Reviewed by Alex Christensen.
+
+ * WebView.cpp:
+ (WebView::sizeChanged): Construct RenderTarget with higher-resolution display timer.
+ (WebView::paintWithDirect2D): Revise to use new RenderTargetHelper class.
+
</ins><span class="cx"> 2016-10-27 Wenson Hsieh <wenson_hsieh@apple.com>
</span><span class="cx">
</span><span class="cx"> Support "insertFromDrop" and "deleteByDrag" for the InputEvent spec
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (208018 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2016-10-27 23:46:13 UTC (rev 208018)
+++ trunk/Source/WebKit/win/WebView.cpp        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -164,6 +164,7 @@
</span><span class="cx"> #include <WebCore/WindowMessageBroadcaster.h>
</span><span class="cx"> #include <WebCore/WindowsTouch.h>
</span><span class="cx"> #include <bindings/ScriptValue.h>
</span><ins>+#include <comdef.h>
</ins><span class="cx"> #include <d2d1.h>
</span><span class="cx"> #include <wtf/MainThread.h>
</span><span class="cx"> #include <wtf/RAMSize.h>
</span><span class="lines">@@ -196,6 +197,10 @@
</span><span class="cx"> #include <WebCore/FullScreenController.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if USE(DIRECT2D)
+#include <WebCore/RenderTargetScopedDrawing.h>
+#endif
+
</ins><span class="cx"> #include <ShlObj.h>
</span><span class="cx"> #include <comutil.h>
</span><span class="cx"> #include <dimm.h>
</span><span class="lines">@@ -1063,7 +1068,7 @@
</span><span class="cx"> // Create a Direct2D render target.
</span><span class="cx"> auto renderTargetProperties = D2D1::RenderTargetProperties();
</span><span class="cx"> renderTargetProperties.usage = D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE;
</span><del>- auto hwndRenderTargetProperties = D2D1::HwndRenderTargetProperties(m_viewWindow, newSize);
</del><ins>+ auto hwndRenderTargetProperties = D2D1::HwndRenderTargetProperties(m_viewWindow, newSize, D2D1_PRESENT_OPTIONS_IMMEDIATELY);
</ins><span class="cx"> HRESULT hr = GraphicsContext::systemFactory()->CreateHwndRenderTarget(&renderTargetProperties, &hwndRenderTargetProperties, &m_renderTarget);
</span><span class="cx"> ASSERT(SUCCEEDED(hr));
</span><span class="cx"> #endif
</span><span class="lines">@@ -1217,7 +1222,6 @@
</span><span class="cx">
</span><span class="cx"> void WebView::paintWithDirect2D()
</span><span class="cx"> {
</span><del>-#if USE(DIRECT2D)
</del><span class="cx"> Frame* coreFrame = core(m_mainFrame);
</span><span class="cx"> if (!coreFrame)
</span><span class="cx"> return;
</span><span class="lines">@@ -1236,46 +1240,43 @@
</span><span class="cx">
</span><span class="cx"> auto pixelSize = D2D1::SizeU(clientRect.width(), clientRect.height());
</span><span class="cx">
</span><del>- auto hwndRenderTargetProperties = D2D1::HwndRenderTargetProperties(m_viewWindow, pixelSize);
</del><ins>+ auto hwndRenderTargetProperties = D2D1::HwndRenderTargetProperties(m_viewWindow, pixelSize, D2D1_PRESENT_OPTIONS_IMMEDIATELY);
</ins><span class="cx"> HRESULT hr = GraphicsContext::systemFactory()->CreateHwndRenderTarget(&renderTargetProperties, &hwndRenderTargetProperties, &m_renderTarget);
</span><span class="cx"> if (!SUCCEEDED(hr))
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_renderTarget->BeginDraw();
</del><ins>+ RECT clientRect = {};
+ GraphicsContext gc(m_renderTarget.get());
</ins><span class="cx">
</span><del>- m_renderTarget->SetTags(WEBKIT_DRAWING, __LINE__);
- m_renderTarget->Clear();
</del><ins>+ {
+ WebCore::RenderTargetScopedDrawing scopedDraw(gc);
</ins><span class="cx">
</span><del>- // Direct2D honors the scale factor natively.
- float scaleFactor = 1.0f;
- float inverseScaleFactor = 1.0f / scaleFactor;
</del><ins>+ m_renderTarget->SetTags(WEBKIT_DRAWING, __LINE__);
+ m_renderTarget->Clear();
</ins><span class="cx">
</span><del>- RECT clientRect;
- GetClientRect(m_viewWindow, &clientRect);
</del><ins>+ // Direct2D honors the scale factor natively.
+ float scaleFactor = 1.0f;
+ float inverseScaleFactor = 1.0f / scaleFactor;
</ins><span class="cx">
</span><del>- IntRect dirtyRectPixels(0, 0, clientRect.right, clientRect.bottom);
- FloatRect logicalDirtyRectFloat = dirtyRectPixels;
- logicalDirtyRectFloat.scale(inverseScaleFactor);
- IntRect logicalDirtyRect(enclosingIntRect(logicalDirtyRectFloat));
</del><ins>+ GetClientRect(m_viewWindow, &clientRect);
</ins><span class="cx">
</span><del>- GraphicsContext gc(m_renderTarget.get());
- gc.setDidBeginDraw(true);
</del><ins>+ IntRect dirtyRectPixels(0, 0, clientRect.right, clientRect.bottom);
+ FloatRect logicalDirtyRectFloat = dirtyRectPixels;
+ logicalDirtyRectFloat.scale(inverseScaleFactor);
+ IntRect logicalDirtyRect(enclosingIntRect(logicalDirtyRectFloat));
</ins><span class="cx">
</span><del>- if (frameView && frameView->frame().contentRenderer()) {
- gc.save();
- gc.scale(FloatSize(scaleFactor, scaleFactor));
- gc.clip(logicalDirtyRect);
- frameView->paint(gc, logicalDirtyRect);
- gc.restore();
- if (m_shouldInvertColors)
- gc.fillRect(logicalDirtyRect, Color::white, CompositeDifference);
</del><ins>+ if (frameView && frameView->frame().contentRenderer()) {
+ gc.save();
+ gc.scale(FloatSize(scaleFactor, scaleFactor));
+ gc.clip(logicalDirtyRect);
+ frameView->paint(gc, logicalDirtyRect);
+ gc.restore();
+ if (m_shouldInvertColors)
+ gc.fillRect(logicalDirtyRect, Color::white, CompositeDifference);
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- HRESULT hr = m_renderTarget->EndDraw();
- // FIXME: Recognize and recover from error state:
- UNUSED_PARAM(hr);
-
</del><span class="cx"> ::ValidateRect(m_viewWindow, &clientRect);
</span><span class="cx"> #else
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -3151,6 +3152,7 @@
</span><span class="cx"> m_page->setDeviceScaleFactor(deviceScaleFactor());
</span><span class="cx">
</span><span class="cx"> setSmartInsertDeleteEnabled(TRUE);
</span><ins>+
</ins><span class="cx"> return hr;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPIPlatformWincmake"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/PlatformWin.cmake (208018 => 208019)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/PlatformWin.cmake        2016-10-27 23:46:13 UTC (rev 208018)
+++ trunk/Tools/TestWebKitAPI/PlatformWin.cmake        2016-10-28 00:21:31 UTC (rev 208019)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx"> set(test_webcore_LIBRARIES
</span><span class="cx"> Crypt32
</span><span class="cx"> D2d1
</span><ins>+ Dwrite
+ dxguid
</ins><span class="cx"> Iphlpapi
</span><span class="cx"> Psapi
</span><span class="cx"> Shlwapi
</span><span class="lines">@@ -35,6 +37,7 @@
</span><span class="cx"> WebCore${DEBUG_SUFFIX}
</span><span class="cx"> WebCoreDerivedSources${DEBUG_SUFFIX}
</span><span class="cx"> WebKit${DEBUG_SUFFIX}
</span><ins>+ WindowsCodecs
</ins><span class="cx"> gtest
</span><span class="cx"> )
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>