<!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>[180308] trunk/Source</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/180308">180308</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2015-02-18 15:05:12 -0800 (Wed, 18 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Adopt WebCore::IOSurface in ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=141751

Reviewed by Simon Fraser.

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::createIOSurface): Deleted.
(WebCore::ImageBuffer::ImageBuffer):
Make use of cachedCGColorSpace.
Make use of WebCore::IOSurface.
Remove the unused size argument from ImageBufferDataCG.
Clear the IOSurface once we've allocated it; WebCore::IOSurface doesn't
do this for us, unlike wkIOSurfaceContextCreate.
Apply the flipping and scale factor to whichever context we made.
We don't need to setIsAcceleratedContext anymore because it's always
false for software contexts, and WebCore::IOSurface will set it for
any accelerated contexts.

(WebCore::ImageBuffer::context):
If we are IOSurface-backed, return WebCore::IOSurface's GraphicsContext.

(WebCore::ImageBuffer::flushContext):
Make use of context(); m_context is now null for accelerated ImageBuffers.

(WebCore::ImageBuffer::copyNativeImage):
Adopt in-line with the Create functions for clarity. Make use of
IOSurface::createImage instead of wkIOSurfaceContextCreateImage.

(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawPattern):
(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):
(WebCore::ImageBuffer::putByteArray):
(WebCore::ImageBuffer::toDataURL):
Make use of context(); m_context is now null for accelerated ImageBuffers.

* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::ImageBufferData):
Indentation fix, and use nullptr.

(WebCore::convertScanline):
Grammar fix (is -&gt; are).

(WebCore::ImageBufferData::getData):
(WebCore::ImageBufferData::putData):
Grab the IOSurfaceRef from the IOSurface wrapper. Eventually these things
should be made more convenient by the wrapper.

* platform/graphics/cg/ImageBufferDataCG.h:
Drop the unused size argument from the constructor.
Reorganize and label the various members which are only used
for a particular type of ImageBufferDataCG.

* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::ensureGraphicsContext):
IOSurface-backed GraphicsContexts are always considered accelerated.

(IOSurface::create):
(IOSurface::IOSurface):
Add a constructor that take an extra size to use when making the CGContext;
it can only be less than the actual backing IOSurface size.
This is needed for <a href="http://trac.webkit.org/projects/webkit/changeset/160121">r160121</a>.

* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Remove old WKSI IOSurface-related functions.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Remove old WKSI IOSurface-related functions.

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Remove old WKSI IOSurface-related functions.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgImageBufferCGcpp">trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgImageBufferDataCGcpp">trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgImageBufferDataCGh">trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaIOSurfaceh">trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaIOSurfacemm">trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformiosWebCoreSystemInterfaceIOSmm">trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreSystemInterfaceh">trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreSystemInterfacemm">trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebSystemInterfacemm">trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportmacWebSystemInterfacemm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebCore/ChangeLog        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -1,3 +1,73 @@
</span><ins>+2015-02-18  Timothy Horton  &lt;timothy_horton@apple.com&gt;
+
+        Adopt WebCore::IOSurface in ImageBuffer
+        https://bugs.webkit.org/show_bug.cgi?id=141751
+
+        Reviewed by Simon Fraser.
+
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        (WebCore::createIOSurface): Deleted.
+        (WebCore::ImageBuffer::ImageBuffer):
+        Make use of cachedCGColorSpace.
+        Make use of WebCore::IOSurface.
+        Remove the unused size argument from ImageBufferDataCG.
+        Clear the IOSurface once we've allocated it; WebCore::IOSurface doesn't
+        do this for us, unlike wkIOSurfaceContextCreate.
+        Apply the flipping and scale factor to whichever context we made.
+        We don't need to setIsAcceleratedContext anymore because it's always
+        false for software contexts, and WebCore::IOSurface will set it for
+        any accelerated contexts.
+
+        (WebCore::ImageBuffer::context):
+        If we are IOSurface-backed, return WebCore::IOSurface's GraphicsContext.
+
+        (WebCore::ImageBuffer::flushContext):
+        Make use of context(); m_context is now null for accelerated ImageBuffers.
+
+        (WebCore::ImageBuffer::copyNativeImage):
+        Adopt in-line with the Create functions for clarity. Make use of
+        IOSurface::createImage instead of wkIOSurfaceContextCreateImage.
+
+        (WebCore::ImageBuffer::draw):
+        (WebCore::ImageBuffer::drawPattern):
+        (WebCore::ImageBuffer::getUnmultipliedImageData):
+        (WebCore::ImageBuffer::getPremultipliedImageData):
+        (WebCore::ImageBuffer::putByteArray):
+        (WebCore::ImageBuffer::toDataURL):
+        Make use of context(); m_context is now null for accelerated ImageBuffers.
+
+        * platform/graphics/cg/ImageBufferDataCG.cpp:
+        (WebCore::ImageBufferData::ImageBufferData):
+        Indentation fix, and use nullptr.
+
+        (WebCore::convertScanline):
+        Grammar fix (is -&gt; are).
+
+        (WebCore::ImageBufferData::getData):
+        (WebCore::ImageBufferData::putData):
+        Grab the IOSurfaceRef from the IOSurface wrapper. Eventually these things
+        should be made more convenient by the wrapper.
+
+        * platform/graphics/cg/ImageBufferDataCG.h:
+        Drop the unused size argument from the constructor.
+        Reorganize and label the various members which are only used
+        for a particular type of ImageBufferDataCG.
+
+        * platform/graphics/cocoa/IOSurface.mm:
+        (IOSurface::ensureGraphicsContext):
+        IOSurface-backed GraphicsContexts are always considered accelerated.
+
+        (IOSurface::create):
+        (IOSurface::IOSurface):
+        Add a constructor that take an extra size to use when making the CGContext;
+        it can only be less than the actual backing IOSurface size.
+        This is needed for r160121.
+
+        * platform/ios/WebCoreSystemInterfaceIOS.mm:
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/mac/WebCoreSystemInterface.mm:
+        Remove old WKSI IOSurface-related functions.
+
</ins><span class="cx"> 2015-02-18  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Prepare to use WEBCORE_EXPORT on Windows.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgImageBufferCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -57,57 +57,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-#if USE(IOSURFACE_CANVAS_BACKING_STORE)
-
-// FIXME: Adopt WebCore::IOSurface.
-static RetainPtr&lt;IOSurfaceRef&gt; createIOSurface(const IntSize&amp; size)
-{
-    unsigned pixelFormat = 'BGRA';
-    unsigned bytesPerElement = 4;
-    int width = size.width();
-    int height = size.height();
-
-    unsigned long bytesPerRow = IOSurfaceAlignProperty(kIOSurfaceBytesPerRow, size.width() * bytesPerElement);
-    if (!bytesPerRow)
-        return 0;
-
-    unsigned long allocSize = IOSurfaceAlignProperty(kIOSurfaceAllocSize, size.height() * bytesPerRow);
-    if (!allocSize)
-        return 0;
-
-#if !PLATFORM(IOS)
-    const void* keys[6];
-    const void* values[6];
-#else
-    const void* keys[7];
-    const void* values[7];
-#endif
-    keys[0] = kIOSurfaceWidth;
-    values[0] = CFNumberCreate(0, kCFNumberIntType, &amp;width);
-    keys[1] = kIOSurfaceHeight;
-    values[1] = CFNumberCreate(0, kCFNumberIntType, &amp;height);
-    keys[2] = kIOSurfacePixelFormat;
-    values[2] = CFNumberCreate(0, kCFNumberIntType, &amp;pixelFormat);
-    keys[3] = kIOSurfaceBytesPerElement;
-    values[3] = CFNumberCreate(0, kCFNumberIntType, &amp;bytesPerElement);
-    keys[4] = kIOSurfaceBytesPerRow;
-    values[4] = CFNumberCreate(0, kCFNumberLongType, &amp;bytesPerRow);
-    keys[5] = kIOSurfaceAllocSize;
-    values[5] = CFNumberCreate(0, kCFNumberLongType, &amp;allocSize);
-#if PLATFORM(IOS)
-    keys[6] = kIOSurfaceCacheMode;
-    int cacheMode = kIOMapWriteCombineCache;
-    values[6] = CFNumberCreate(0, kCFNumberIntType, &amp;cacheMode);
-#endif
-
-    RetainPtr&lt;CFDictionaryRef&gt; dict = adoptCF(CFDictionaryCreate(0, keys, values, WTF_ARRAY_LENGTH(values), &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
-    for (unsigned i = 0; i &lt; WTF_ARRAY_LENGTH(values); ++i)
-        CFRelease(values[i]);
-
-    return adoptCF(IOSurfaceCreate(dict.get()));
-}
-#endif
-
</del><span class="cx"> static void releaseImageData(void*, const void* data, size_t)
</span><span class="cx"> {
</span><span class="cx">     fastFree(const_cast&lt;void*&gt;(data));
</span><span class="lines">@@ -121,8 +70,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ImageBuffer::ImageBuffer(const FloatSize&amp; size, float resolutionScale, ColorSpace imageColorSpace, RenderingMode renderingMode, bool&amp; success)
</span><del>-    : m_data(IntSize(size)) // NOTE: The input here isn't important as ImageBufferDataCG's constructor just ignores it.
-    , m_logicalSize(size)
</del><ins>+    : m_logicalSize(size)
</ins><span class="cx">     , m_resolutionScale(resolutionScale)
</span><span class="cx"> {
</span><span class="cx">     float scaledWidth = ceilf(resolutionScale * size.width());
</span><span class="lines">@@ -159,25 +107,18 @@
</span><span class="cx">     ASSERT(renderingMode == Unaccelerated);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    switch (imageColorSpace) {
-    case ColorSpaceDeviceRGB:
-        m_data.m_colorSpace = deviceRGBColorSpaceRef();
-        break;
-    case ColorSpaceSRGB:
-        m_data.m_colorSpace = sRGBColorSpaceRef();
-        break;
-    case ColorSpaceLinearRGB:
-        m_data.m_colorSpace = linearRGBColorSpaceRef();
-        break;
-    }
</del><ins>+    m_data.m_colorSpace = cachedCGColorSpace(imageColorSpace);
</ins><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;CGContextRef&gt; cgContext;
</span><span class="cx">     if (accelerateRendering) {
</span><span class="cx"> #if USE(IOSURFACE_CANVAS_BACKING_STORE)
</span><del>-        m_data.m_surface = createIOSurface(m_data.m_backingStoreSize);
</del><span class="cx">         FloatSize userBounds = scaleSizeToUserSpace(FloatSize(width.unsafeGet(), height.unsafeGet()), m_data.m_backingStoreSize, m_size);
</span><del>-        cgContext = adoptCF(wkIOSurfaceContextCreate(m_data.m_surface.get(), userBounds.width(), userBounds.height(), m_data.m_colorSpace));
</del><ins>+        m_data.m_surface = IOSurface::create(m_data.m_backingStoreSize, IntSize(userBounds), imageColorSpace);
+        cgContext = m_data.m_surface-&gt;ensurePlatformContext();
+        if (cgContext)
+            CGContextClearRect(cgContext.get(), FloatRect(FloatPoint(), userBounds));
</ins><span class="cx"> #endif
</span><ins>+
</ins><span class="cx">         if (!cgContext)
</span><span class="cx">             accelerateRendering = false; // If allocation fails, fall back to non-accelerated path.
</span><span class="cx">     }
</span><span class="lines">@@ -195,16 +136,17 @@
</span><span class="cx">         cgContext = adoptCF(CGBitmapContextCreate(m_data.m_data, m_data.m_backingStoreSize.width(), m_data.m_backingStoreSize.height(), 8, m_data.m_bytesPerRow.unsafeGet(), m_data.m_colorSpace, m_data.m_bitmapInfo));
</span><span class="cx">         // Create a live image that wraps the data.
</span><span class="cx">         m_data.m_dataProvider = adoptCF(CGDataProviderCreateWithData(0, m_data.m_data, numBytes.unsafeGet(), releaseImageData));
</span><ins>+
+        if (!cgContext)
+            return;
+
+        m_context = adoptPtr(new GraphicsContext(cgContext.get()));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!cgContext)
-        return;
</del><ins>+    context()-&gt;scale(FloatSize(1, -1));
+    context()-&gt;translate(0, -m_data.m_backingStoreSize.height());
+    context()-&gt;applyDeviceScaleFactor(m_resolutionScale);
</ins><span class="cx"> 
</span><del>-    m_context = adoptPtr(new GraphicsContext(cgContext.get()));
-    m_context-&gt;scale(FloatSize(1, -1));
-    m_context-&gt;translate(0, -m_data.m_backingStoreSize.height());
-    m_context-&gt;applyDeviceScaleFactor(m_resolutionScale);
-    m_context-&gt;setIsAcceleratedContext(accelerateRendering);
</del><span class="cx">     success = true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -214,12 +156,16 @@
</span><span class="cx"> 
</span><span class="cx"> GraphicsContext* ImageBuffer::context() const
</span><span class="cx"> {
</span><ins>+#if USE(IOSURFACE_CANVAS_BACKING_STORE)
+    if (m_data.m_surface)
+        return &amp;m_data.m_surface-&gt;ensureGraphicsContext();
+#endif
</ins><span class="cx">     return m_context.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ImageBuffer::flushContext() const
</span><span class="cx"> {
</span><del>-    CGContextFlush(m_context-&gt;platformContext());
</del><ins>+    CGContextFlush(context()-&gt;platformContext());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static RetainPtr&lt;CGImageRef&gt; createCroppedImageIfNecessary(CGImageRef image, const IntSize&amp; bounds)
</span><span class="lines">@@ -263,14 +209,14 @@
</span><span class="cx"> 
</span><span class="cx"> RetainPtr&lt;CGImageRef&gt; ImageBuffer::copyNativeImage(BackingStoreCopy copyBehavior) const
</span><span class="cx"> {
</span><del>-    CGImageRef image = 0;
-    if (!m_context-&gt;isAcceleratedContext()) {
</del><ins>+    RetainPtr&lt;CGImageRef&gt; image;
+    if (!context()-&gt;isAcceleratedContext()) {
</ins><span class="cx">         switch (copyBehavior) {
</span><span class="cx">         case DontCopyBackingStore:
</span><del>-            image = CGImageCreate(m_data.m_backingStoreSize.width(), m_data.m_backingStoreSize.height(), 8, 32, m_data.m_bytesPerRow.unsafeGet(), m_data.m_colorSpace, m_data.m_bitmapInfo, m_data.m_dataProvider.get(), 0, true, kCGRenderingIntentDefault);
</del><ins>+            image = adoptCF(CGImageCreate(m_data.m_backingStoreSize.width(), m_data.m_backingStoreSize.height(), 8, 32, m_data.m_bytesPerRow.unsafeGet(), m_data.m_colorSpace, m_data.m_bitmapInfo, m_data.m_dataProvider.get(), 0, true, kCGRenderingIntentDefault));
</ins><span class="cx">             break;
</span><span class="cx">         case CopyBackingStore:
</span><del>-            image = CGBitmapContextCreateImage(context()-&gt;platformContext());
</del><ins>+            image = adoptCF(CGBitmapContextCreateImage(context()-&gt;platformContext()));
</ins><span class="cx">             break;
</span><span class="cx">         default:
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="lines">@@ -279,19 +225,19 @@
</span><span class="cx">     }
</span><span class="cx"> #if USE(IOSURFACE_CANVAS_BACKING_STORE)
</span><span class="cx">     else
</span><del>-        image = wkIOSurfaceContextCreateImage(context()-&gt;platformContext());
</del><ins>+        image = m_data.m_surface-&gt;createImage();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    return adoptCF(image);
</del><ins>+    return image;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ImageBuffer::draw(GraphicsContext* destContext, ColorSpace styleColorSpace, const FloatRect&amp; destRect, const FloatRect&amp; srcRect, CompositeOperator op, BlendMode blendMode, bool useLowQualityScale)
</span><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(useLowQualityScale);
</span><del>-    ColorSpace colorSpace = (destContext == m_context) ? ColorSpaceDeviceRGB : styleColorSpace;
</del><ins>+    ColorSpace colorSpace = (destContext == context()) ? ColorSpaceDeviceRGB : styleColorSpace;
</ins><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;CGImageRef&gt; image;
</span><del>-    if (destContext == m_context || destContext-&gt;isAcceleratedContext())
</del><ins>+    if (destContext == context() || destContext-&gt;isAcceleratedContext())
</ins><span class="cx">         image = copyNativeImage(CopyBackingStore); // Drawing into our own buffer, need to deep copy.
</span><span class="cx">     else
</span><span class="cx">         image = copyNativeImage(DontCopyBackingStore);
</span><span class="lines">@@ -306,8 +252,8 @@
</span><span class="cx">     FloatRect adjustedSrcRect = srcRect;
</span><span class="cx">     adjustedSrcRect.scale(m_resolutionScale, m_resolutionScale);
</span><span class="cx"> 
</span><del>-    if (!m_context-&gt;isAcceleratedContext()) {
-        if (destContext == m_context || destContext-&gt;isAcceleratedContext()) {
</del><ins>+    if (!context()-&gt;isAcceleratedContext()) {
+        if (destContext == context() || destContext-&gt;isAcceleratedContext()) {
</ins><span class="cx">             RefPtr&lt;Image&gt; copy = copyImage(CopyBackingStore); // Drawing into our own buffer, need to deep copy.
</span><span class="cx">             copy-&gt;drawPattern(destContext, adjustedSrcRect, patternTransform, phase, styleColorSpace, op, destRect, blendMode);
</span><span class="cx">         } else {
</span><span class="lines">@@ -337,31 +283,31 @@
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;Uint8ClampedArray&gt; ImageBuffer::getUnmultipliedImageData(const IntRect&amp; rect, CoordinateSystem coordinateSystem) const
</span><span class="cx"> {
</span><del>-    if (m_context-&gt;isAcceleratedContext())
</del><ins>+    if (context()-&gt;isAcceleratedContext())
</ins><span class="cx">         flushContext();
</span><span class="cx"> 
</span><span class="cx">     IntRect srcRect = rect;
</span><span class="cx">     if (coordinateSystem == LogicalCoordinateSystem)
</span><span class="cx">         srcRect.scale(m_resolutionScale);
</span><span class="cx"> 
</span><del>-    return m_data.getData(srcRect, internalSize(), m_context-&gt;isAcceleratedContext(), true, 1);
</del><ins>+    return m_data.getData(srcRect, internalSize(), context()-&gt;isAcceleratedContext(), true, 1);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;Uint8ClampedArray&gt; ImageBuffer::getPremultipliedImageData(const IntRect&amp; rect, CoordinateSystem coordinateSystem) const
</span><span class="cx"> {
</span><del>-    if (m_context-&gt;isAcceleratedContext())
</del><ins>+    if (context()-&gt;isAcceleratedContext())
</ins><span class="cx">         flushContext();
</span><span class="cx"> 
</span><span class="cx">     IntRect srcRect = rect;
</span><span class="cx">     if (coordinateSystem == LogicalCoordinateSystem)
</span><span class="cx">         srcRect.scale(m_resolutionScale);
</span><span class="cx"> 
</span><del>-    return m_data.getData(srcRect, internalSize(), m_context-&gt;isAcceleratedContext(), false, 1);
</del><ins>+    return m_data.getData(srcRect, internalSize(), context()-&gt;isAcceleratedContext(), false, 1);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ImageBuffer::putByteArray(Multiply multiplied, Uint8ClampedArray* source, const IntSize&amp; sourceSize, const IntRect&amp; sourceRect, const IntPoint&amp; destPoint, CoordinateSystem coordinateSystem)
</span><span class="cx"> {
</span><del>-    if (!m_context-&gt;isAcceleratedContext()) {
</del><ins>+    if (!context()-&gt;isAcceleratedContext()) {
</ins><span class="cx">         IntRect scaledSourceRect = sourceRect;
</span><span class="cx">         IntSize scaledSourceSize = sourceSize;
</span><span class="cx">         if (coordinateSystem == LogicalCoordinateSystem) {
</span><span class="lines">@@ -484,7 +430,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));
</span><span class="cx"> 
</span><del>-    if (m_context-&gt;isAcceleratedContext())
</del><ins>+    if (context()-&gt;isAcceleratedContext())
</ins><span class="cx">         flushContext();
</span><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;CFStringRef&gt; uti = utiFromMIMEType(mimeType);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgImageBufferDataCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(IOSURFACE_CANVAS_BACKING_STORE)
</span><ins>+#include &quot;IOSurface.h&quot;
</ins><span class="cx"> #include &quot;IOSurfaceSPI.h&quot;
</span><span class="cx"> #include &lt;dispatch/dispatch.h&gt;
</span><span class="cx"> #endif
</span><span class="lines">@@ -54,10 +55,10 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-ImageBufferData::ImageBufferData(const IntSize&amp;)
-: m_data(0)
</del><ins>+ImageBufferData::ImageBufferData()
+    : m_data(nullptr)
</ins><span class="cx"> #if USE(IOSURFACE_CANVAS_BACKING_STORE)
</span><del>-, m_surface(0)
</del><ins>+    , m_surface(nullptr)
</ins><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -89,7 +90,7 @@
</span><span class="cx">             return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // Swap channels 1 and 3, to convert BGRA&lt;-&gt;RGBA. IOSurfaces is BGRA, ImageData expects RGBA.
</del><ins>+    // Swap channels 1 and 3, to convert BGRA&lt;-&gt;RGBA. IOSurfaces are BGRA, ImageData expects RGBA.
</ins><span class="cx">     const uint8_t map[4] = { 2, 1, 0, 3 };
</span><span class="cx">     vImagePermuteChannels_ARGB8888(&amp;dest, &amp;dest, map, kvImageDoNotTile);
</span><span class="cx"> }
</span><span class="lines">@@ -269,7 +270,8 @@
</span><span class="cx">         }
</span><span class="cx">     } else {
</span><span class="cx"> #if USE(IOSURFACE_CANVAS_BACKING_STORE)
</span><del>-        IOSurfaceRef surface = m_surface.get();
</del><ins>+        // FIXME: WebCore::IOSurface should have a locking RAII object and base-address getter.
+        IOSurfaceRef surface = m_surface-&gt;surface();
</ins><span class="cx">         IOSurfaceLock(surface, kIOSurfaceLockReadOnly, 0);
</span><span class="cx">         srcBytesPerRow = IOSurfaceGetBytesPerRow(surface);
</span><span class="cx">         srcRows = (unsigned char*)(IOSurfaceGetBaseAddress(surface)) + originy * srcBytesPerRow + originx * 4;
</span><span class="lines">@@ -513,7 +515,7 @@
</span><span class="cx">         }
</span><span class="cx">     } else {
</span><span class="cx"> #if USE(IOSURFACE_CANVAS_BACKING_STORE)
</span><del>-        IOSurfaceRef surface = m_surface.get();
</del><ins>+        IOSurfaceRef surface = m_surface-&gt;surface();
</ins><span class="cx">         IOSurfaceLock(surface, 0, 0);
</span><span class="cx">         destBytesPerRow = IOSurfaceGetBytesPerRow(surface);
</span><span class="cx">         destRows = (unsigned char*)(IOSurfaceGetBaseAddress(surface)) + (desty * destBytesPerRow + destx * 4).unsafeGet();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgImageBufferDataCGh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -43,21 +43,27 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class IOSurface;
</ins><span class="cx"> class IntSize;
</span><span class="cx"> 
</span><span class="cx"> class ImageBufferData {
</span><span class="cx"> public:
</span><del>-    ImageBufferData(const IntSize&amp;);
</del><ins>+    ImageBufferData();
</ins><span class="cx"> 
</span><ins>+    IntSize m_backingStoreSize;
+    Checked&lt;unsigned, RecordOverflow&gt; m_bytesPerRow;
+    CGColorSpaceRef m_colorSpace;
+
+    // Only for Software ImageBuffers.
</ins><span class="cx">     void* m_data;
</span><del>-    
</del><span class="cx">     RetainPtr&lt;CGDataProviderRef&gt; m_dataProvider;
</span><span class="cx">     CGBitmapInfo m_bitmapInfo;
</span><del>-    Checked&lt;unsigned, RecordOverflow&gt; m_bytesPerRow;
-    CGColorSpaceRef m_colorSpace;
-    RetainPtr&lt;IOSurfaceRef&gt; m_surface;
-    IntSize m_backingStoreSize;
</del><span class="cx"> 
</span><ins>+#if WTF_USE_IOSURFACE_CANVAS_BACKING_STORE
+    // Only for Accelerated ImageBuffers.
+    std::unique_ptr&lt;IOSurface&gt; m_surface;
+#endif
+
</ins><span class="cx">     PassRefPtr&lt;Uint8ClampedArray&gt; getData(const IntRect&amp;, const IntSize&amp;, bool accelerateRendering, bool unmultiplied, float resolutionScale) const;
</span><span class="cx">     void putData(Uint8ClampedArray*&amp; source, const IntSize&amp; sourceSize, const IntRect&amp; sourceRect, const IntPoint&amp; destPoint, const IntSize&amp;, bool accelerateRendering, bool unmultiplied, float resolutionScale);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaIOSurfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> class IOSurface final {
</span><span class="cx"> public:
</span><span class="cx">     WEBCORE_EXPORT static std::unique_ptr&lt;IOSurface&gt; create(IntSize, ColorSpace);
</span><ins>+    WEBCORE_EXPORT static std::unique_ptr&lt;IOSurface&gt; create(IntSize, IntSize contextSize, ColorSpace);
</ins><span class="cx">     WEBCORE_EXPORT static std::unique_ptr&lt;IOSurface&gt; createFromSendRight(const MachSendRight&amp;, ColorSpace);
</span><span class="cx">     static std::unique_ptr&lt;IOSurface&gt; createFromSurface(IOSurfaceRef, ColorSpace);
</span><span class="cx">     WEBCORE_EXPORT static std::unique_ptr&lt;IOSurface&gt; createFromImage(CGImageRef);
</span><span class="lines">@@ -81,10 +82,12 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     IOSurface(IntSize, ColorSpace);
</span><ins>+    IOSurface(IntSize, IntSize contextSize, ColorSpace);
</ins><span class="cx">     IOSurface(IOSurfaceRef, ColorSpace);
</span><span class="cx"> 
</span><span class="cx">     ColorSpace m_colorSpace;
</span><span class="cx">     IntSize m_size;
</span><ins>+    IntSize m_contextSize;
</ins><span class="cx">     size_t m_totalBytes;
</span><span class="cx"> 
</span><span class="cx">     OwnPtr&lt;GraphicsContext&gt; m_graphicsContext;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaIOSurfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -48,6 +48,12 @@
</span><span class="cx">     return std::unique_ptr&lt;IOSurface&gt;(new IOSurface(size, colorSpace));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+std::unique_ptr&lt;IOSurface&gt; IOSurface::create(IntSize size, IntSize contextSize, ColorSpace colorSpace)
+{
+    // FIXME: We should be able to pull surfaces out of the IOSurfacePool and adjust their contextSize.
+    return std::unique_ptr&lt;IOSurface&gt;(new IOSurface(size, contextSize, colorSpace));
+}
+
</ins><span class="cx"> std::unique_ptr&lt;IOSurface&gt; IOSurface::createFromSendRight(const MachSendRight&amp; sendRight, ColorSpace colorSpace)
</span><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;IOSurfaceRef&gt; surface = adoptCF(IOSurfaceLookupFromMachPort(sendRight.sendRight()));
</span><span class="lines">@@ -78,6 +84,7 @@
</span><span class="cx"> IOSurface::IOSurface(IntSize size, ColorSpace colorSpace)
</span><span class="cx">     : m_colorSpace(colorSpace)
</span><span class="cx">     , m_size(size)
</span><ins>+    , m_contextSize(size)
</ins><span class="cx"> {
</span><span class="cx">     unsigned pixelFormat = 'BGRA';
</span><span class="cx">     unsigned bytesPerElement = 4;
</span><span class="lines">@@ -105,6 +112,14 @@
</span><span class="cx">     m_surface = adoptCF(IOSurfaceCreate((CFDictionaryRef)options));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IOSurface::IOSurface(IntSize size, IntSize contextSize, ColorSpace colorSpace)
+    : IOSurface(size, colorSpace)
+{
+    ASSERT(contextSize.width() &lt;= size.width());
+    ASSERT(contextSize.height() &lt;= size.height());
+    m_contextSize = contextSize;
+}
+
</ins><span class="cx"> IOSurface::IOSurface(IOSurfaceRef surface, ColorSpace colorSpace)
</span><span class="cx">     : m_colorSpace(colorSpace)
</span><span class="cx">     , m_surface(surface)
</span><span class="lines">@@ -136,7 +151,7 @@
</span><span class="cx">     CGBitmapInfo bitmapInfo = kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host;
</span><span class="cx">     size_t bitsPerComponent = 8;
</span><span class="cx">     size_t bitsPerPixel = 32;
</span><del>-    m_cgContext = adoptCF(CGIOSurfaceContextCreate(m_surface.get(), m_size.width(), m_size.height(), bitsPerComponent, bitsPerPixel, cachedCGColorSpace(m_colorSpace), bitmapInfo));
</del><ins>+    m_cgContext = adoptCF(CGIOSurfaceContextCreate(m_surface.get(), m_contextSize.width(), m_contextSize.height(), bitsPerComponent, bitsPerPixel, cachedCGColorSpace(m_colorSpace), bitmapInfo));
</ins><span class="cx"> 
</span><span class="cx">     return m_cgContext.get();
</span><span class="cx"> }
</span><span class="lines">@@ -147,6 +162,7 @@
</span><span class="cx">         return *m_graphicsContext;
</span><span class="cx"> 
</span><span class="cx">     m_graphicsContext = adoptPtr(new GraphicsContext(ensurePlatformContext()));
</span><ins>+    m_graphicsContext-&gt;setIsAcceleratedContext(true);
</ins><span class="cx"> 
</span><span class="cx">     return *m_graphicsContext;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosWebCoreSystemInterfaceIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -70,11 +70,6 @@
</span><span class="cx"> WEBCORE_EXPORT void (*wkSetRequestStorageSession)(CFURLStorageSessionRef, CFMutableURLRequestRef);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if !PLATFORM(IOS_SIMULATOR)
-WEBCORE_EXPORT CGContextRef (*wkIOSurfaceContextCreate)(IOSurfaceRef surface, unsigned width, unsigned height, CGColorSpaceRef colorSpace);
-WEBCORE_EXPORT CGImageRef (*wkIOSurfaceContextCreateImage)(CGContextRef context);
-#endif // !PLATFORM(IOS_SIMULATOR)
-
</del><span class="cx"> WEBCORE_EXPORT CFURLStorageSessionRef (*wkCreatePrivateStorageSession)(CFStringRef);
</span><span class="cx"> WEBCORE_EXPORT NSURLRequest* (*wkCopyRequestWithStorageSession)(CFURLStorageSessionRef, NSURLRequest*);
</span><span class="cx"> WEBCORE_EXPORT CFHTTPCookieStorageRef (*wkCopyHTTPCookieStorage)(CFURLStorageSessionRef);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreSystemInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -221,11 +221,6 @@
</span><span class="cx"> extern void* wkGetHyphenationLocationBeforeIndex;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA) &amp;&amp; USE(CA) &amp;&amp; !PLATFORM(IOS_SIMULATOR)
-extern CGContextRef (*wkIOSurfaceContextCreate)(IOSurfaceRef surface, unsigned width, unsigned height, CGColorSpaceRef colorSpace);
-extern CGImageRef (*wkIOSurfaceContextCreateImage)(CGContextRef context);
-#endif
-
</del><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> extern int (*wkRecommendedScrollerStyle)(void);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -102,9 +102,6 @@
</span><span class="cx"> 
</span><span class="cx"> void* wkGetHyphenationLocationBeforeIndex;
</span><span class="cx"> 
</span><del>-CGContextRef (*wkIOSurfaceContextCreate)(IOSurfaceRef surface, unsigned width, unsigned height, CGColorSpaceRef colorSpace);
-CGImageRef (*wkIOSurfaceContextCreateImage)(CGContextRef context);
-
</del><span class="cx"> int (*wkRecommendedScrollerStyle)(void);
</span><span class="cx"> 
</span><span class="cx"> bool (*wkExecutableWasLinkedOnOrBeforeSnowLeopard)(void);
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-02-18  Timothy Horton  &lt;timothy_horton@apple.com&gt;
+
+        Adopt WebCore::IOSurface in ImageBuffer
+        https://bugs.webkit.org/show_bug.cgi?id=141751
+
+        Reviewed by Simon Fraser.
+
+        * WebCoreSupport/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+        Remove old WKSI IOSurface-related functions.
+
</ins><span class="cx"> 2015-02-18  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r180286.
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -128,10 +128,6 @@
</span><span class="cx">     INIT(GetMediaUIImageData);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if !PLATFORM(IOS_SIMULATOR)
-    INIT(IOSurfaceContextCreate);
-    INIT(IOSurfaceContextCreateImage);
-#endif
</del><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">     INIT(RecommendedScrollerStyle);
</span><span class="cx">     INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebKit2/ChangeLog        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-02-18  Timothy Horton  &lt;timothy_horton@apple.com&gt;
+
+        Adopt WebCore::IOSurface in ImageBuffer
+        https://bugs.webkit.org/show_bug.cgi?id=141751
+
+        Reviewed by Simon Fraser.
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+        Remove old WKSI IOSurface-related functions.
+
</ins><span class="cx"> 2015-02-18  Beth Dakin  &lt;bdakin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         iBooks immediate action blacklist should not even create the gesture recognizer
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportmacWebSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (180307 => 180308)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm        2015-02-18 23:02:22 UTC (rev 180307)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm        2015-02-18 23:05:12 UTC (rev 180308)
</span><span class="lines">@@ -119,10 +119,6 @@
</span><span class="cx">         INIT(SetMetadataURL);
</span><span class="cx"> #endif // !PLATFORM(IOS)
</span><span class="cx"> 
</span><del>-#if !PLATFORM(IOS_SIMULATOR)
-        INIT(IOSurfaceContextCreate);
-        INIT(IOSurfaceContextCreateImage);
-#endif // !PLATFORM(IOS_SIMULATOR)
</del><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">         INIT(RecommendedScrollerStyle);
</span><span class="cx">         INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
</span></span></pre>
</div>
</div>

</body>
</html>