<!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>[198655] 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/198655">198655</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-03-24 18:13:10 -0700 (Thu, 24 Mar 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Change NativeImagePtr for CG to be RetainPtr<CGImageRef>
https://bugs.webkit.org/show_bug.cgi?id=155412
Patch by Said Abou-Hallawa <sabouhallawa@apple,com> on 2016-03-24
Reviewed by Darin Adler.
Source/WebCore:
Having NativeImagePtr as a raw pointer makes managing the life cycle of
the returned CGImageRef hard. A lot of work was done to ensure the CG
pointer is refcounted correctly. It was also not possible to move a
FrameData since calling the destructor was releasing the CGImageRef.
With this change, PassNativeImagePtr is not needed anymore. So all the
instance of PassNativeImagePtr can be replaced by NativeImagePtr.
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::nativeImageForCurrentTime):
* html/HTMLVideoElement.h: Replace PassNativeImagePtr with NativeImagePtr.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage): Replace PassNativeImagePtr
with NativeImagePtr.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::addImageToCache):
* loader/cache/MemoryCache.h: Remove USE(CG) and CFRetain(image) since
this code can compile on all platforms. The image refcount will be
incremented when the image is assigned to FrameData.m_image in the
BitmapImage constructor.
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::synchronousNativeIconForPageURL):
* loader/icon/IconDatabase.h:
* loader/icon/IconDatabaseBase.h: Replace PassNativeImagePtr with NativeImagePtr.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::haveFrameImageAtIndex):
(WebCore::BitmapImage::cacheFrame):
(WebCore::BitmapImage::ensureFrameIsCached):
(WebCore::BitmapImage::frameImageAtIndex):
(WebCore::BitmapImage::nativeImageForCurrentFrame):
(WebCore::BitmapImage::haveFrameAtIndex): Deleted.
(WebCore::BitmapImage::frameAtIndex): Deleted.
Replace PassNativeImagePtr with NativeImagePtr, m_frame with m_image and
*Frame* with *FrameImage*.
* platform/graphics/BitmapImage.h:
(WebCore::FrameData::FrameData):
A BitmapImage can have one or more FrameData. A FrameData member can be
named for shortness as "frame", "m_frames", etc. A FrameData can have
zero or one NativeImagePtr. A NativeImagePtr can be named as "image",
"m_image", etc.
* platform/graphics/GraphicsContext.h: Replace PassNativeImagePtr with
NativeImagePtr.
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/Icon.h:
Change the members of type CGImageRef to be RetainPtr<CGImageRef>.
* platform/graphics/Image.h:
(WebCore::Image::nativeImageForCurrentFrame):
(WebCore::Image::getNSImage):
(WebCore::Image::getTIFFRepresentation):
(WebCore::Image::getCGImageRef):
(WebCore::Image::getFirstCGImageRefOfSize):
(WebCore::Image::getCGImageArray):
(WebCore::Image::getGdkPixbuf):
(WebCore::Image::getEvasObject):
* platform/graphics/ImageBuffer.h:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::createFrameImageAtIndex):
(WebCore::ImageSource::createFrameAtIndex): Deleted.
* platform/graphics/ImageSource.h:
Change 0 to nullptr, PassRefPtr to RefPtr and PassNativeImagePtr to
NativeImagePtr.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::nativeImageForCurrentTime):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime):
Replace PassNativeImagePtr with NativeImagePtr.
* platform/graphics/NativeImagePtr.h:
Make NativeImagePtr a smart pointer for CG. Get rid of PassNativeImagePtr
since NativeImagePtr is now a smart pointer on all platforms.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime):
Replace PassNativeImagePtr with NativeImagePtr.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsToImage):
Since Image::nativeImageForCurrentFrame() returns a RetainPtr, move it
to m_pendingContentsImage to remove the refcount churn.
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::checkForSolidColor):
(WebCore::FrameData::clear):
Replace m_frame with m_image and frame* with frameImage*.
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::copyCairoImageSurface):
* platform/graphics/cairo/CairoUtilities.h:
Replace PassRefPtr with RefPtr.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
Replace *Frame* with *FrameImage*.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawNativeImage):
Replace PassNativeImagePtr with NativeImagePtr.
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::copyImage): Create a new NativeImagePtr so it can
be moved to the BitmapImage::create().
(WebCore::copySurfaceToImageAndAdjustRect):
(WebCore::getImageData):
(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):
Replace PassRefPtr with RefPtr.
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::FrameData::clear): No need to call CGImageRelease(). Just assign
m_image to nullptr and CGImageRelease() will be called from the RetainPtr
destructor.
(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::checkForSolidColor):
(WebCore::BitmapImage::getCGImageRef):
(WebCore::BitmapImage::getFirstCGImageRefOfSize):
(WebCore::BitmapImage::getCGImageArray):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::copyUnscaledFrameImageAtIndex):
(WebCore::BitmapImage::copyUnscaledFrameAtIndex): Deleted.
Replace CGImageRef with RetainPtr<CGImageRef>. Replace *Frame* with
*FrameImage*.
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
(WebCore::GraphicsContext3D::paintToCanvas):
Use m_cgImage.get() instead of m_cgImage when calling CG functions.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::drawPattern):
Replace PassNativeImagePtr with NativeImagePtr. Get the raw CGImageRef
from the NativeImagePtr when calling the CG functions.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::createBitmapImageAfterScalingIfNeeded): Move the image argument
when calling BitmapImage::create().
(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):
Replace PassRefPtr with RefPtr.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::createFrameImageAtIndex):
(WebCore::ImageSource::createFrameAtIndex): Deleted.
Rename the function and simplify the code since the local variable
and the return value are both smart pointers.
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawNativeImage::DrawNativeImage):
(WebCore::DisplayList::DrawNativeImage::apply):
* platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::DrawNativeImage::create):
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawNativeImage):
* platform/graphics/displaylists/DisplayListRecorder.h:
Replace PassNativeImagePtr with NativeImagePtr and use constant reference.
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
Call a function with its new name.
* platform/graphics/efl/IconEfl.cpp:
(WebCore::Icon::createIconForFiles):
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
(ImageGStreamer::ImageGStreamer):
* platform/graphics/gtk/IconGtk.cpp:
(WebCore::Icon::createIconForFiles):
* platform/graphics/ios/IconIOS.mm:
(WebCore::Icon::Icon):
(WebCore::Icon::createIconForFiles):
(WebCore::Icon::createIconForImage):
* platform/graphics/mac/IconMac.mm:
(WebCore::Icon::createIconForFiles):
Use smart pointers RetainPtr<CGImageRef> instead of raw pointers CGImageRef.
And change PassRefPtr to RefPtr and 0 to nullptr.
* platform/graphics/mac/ImageMac.mm:
(WebCore::BitmapImage::getTIFFRepresentation): Get the raw pointer from the
returned smart pointer.
* platform/graphics/texmap/coordinated/CoordinatedSurface.cpp:
(WebCore::CoordinatedSurface::create):
* platform/graphics/texmap/coordinated/CoordinatedSurface.h:
Replace PassRefPtr with RefPtr.
* platform/graphics/win/IconWin.cpp:
(WebCore::Icon::createIconForFiles): Change PassRefPtr to RefPtr.
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::create): Replace PassRefPtr with RefPtr.
(WebCore::BitmapImage::drawFrameMatchingSourceSize): Call the function
with its new name and get the raw pointer from the returned smart pointer.
* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::create): Replace PassRefPtr with ReftPtr and use
the move semantics for passing the argument to BitmapImage::create().
(WebCore::BitmapImage::drawFrameMatchingSourceSize): Call the function
with its new name.
* platform/image-decoders/ImageDecoder.h:
* platform/image-decoders/cairo/ImageDecoderCairo.cpp:
(WebCore::ImageFrame::asNewNativeImage):
* platform/win/DragImageCGWin.cpp:
(WebCore::createDragImageFromImage):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::nativeImageForCurrentFrame):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::nativeImageForCurrentFrame):
* svg/graphics/SVGImageForContainer.h:
Replace PassNativeImagePtr with NativeImagePtr.
Source/WebKit/mac:
* Misc/WebCache.mm:
(+[WebCache addImageToCache:forURL:forFrame:]):
WebCore::MemoryCache() is taking an rvalue NativeImagePtr. We need to create
NativeImagePtr from the image raw pointer when calling this function.
Source/WebKit/win:
* Plugins/PluginView.h:
* Plugins/PluginViewWin.cpp:
(WebCore::PluginView::snapshot):
Replace PassRefPtr with RefPtr.
Source/WebKit2:
* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
(WebKit::WebCoordinatedSurface::createWithSurface):
(WebKit::WebCoordinatedSurface::create):
(WebKit::WebCoordinatedSurface::WebCoordinatedSurface):
(WebKit::WebCoordinatedSurface::copyToTexture):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::create):
(WebKit::ShareableBitmap::createShareable):
(WebKit::ShareableBitmap::ShareableBitmap):
* Shared/ShareableBitmap.h:
Replace PassRefPtr with RefPtr and use WTFMove() instead of RefPtr::release()
when passing the RefPtr.
* Shared/cairo/ShareableBitmapCairo.cpp:
(WebKit::createSurfaceFromData):
(WebKit::ShareableBitmap::createCairoSurface):
Replace PassRefPtr with RefPtr.
(WebKit::ShareableBitmap::createImage):
* Shared/cg/ShareableBitmapCG.cpp:
(WebKit::ShareableBitmap::createImage):
Replace PassRefPtr with RefPtr and use the move semantics when calling
BitmapImage::create().
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::createCoordinatedSurface):
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
Replace PassRefPtr with RefPtr</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLVideoElementcpp">trunk/Source/WebCore/html/HTMLVideoElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLVideoElementh">trunk/Source/WebCore/html/HTMLVideoElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp">trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheMemoryCachecpp">trunk/Source/WebCore/loader/cache/MemoryCache.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheMemoryCacheh">trunk/Source/WebCore/loader/cache/MemoryCache.h</a></li>
<li><a href="#trunkSourceWebCoreloadericonIconDatabasecpp">trunk/Source/WebCore/loader/icon/IconDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadericonIconDatabaseh">trunk/Source/WebCore/loader/icon/IconDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreloadericonIconDatabaseBaseh">trunk/Source/WebCore/loader/icon/IconDatabaseBase.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsBitmapImagecpp">trunk/Source/WebCore/platform/graphics/BitmapImage.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsBitmapImageh">trunk/Source/WebCore/platform/graphics/BitmapImage.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContexth">trunk/Source/WebCore/platform/graphics/GraphicsContext.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContext3Dh">trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsIconh">trunk/Source/WebCore/platform/graphics/Icon.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsImageh">trunk/Source/WebCore/platform/graphics/Image.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsImageBufferh">trunk/Source/WebCore/platform/graphics/ImageBuffer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsImageSourcecpp">trunk/Source/WebCore/platform/graphics/ImageSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsImageSourceh">trunk/Source/WebCore/platform/graphics/ImageSource.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsMediaPlayercpp">trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsMediaPlayerh">trunk/Source/WebCore/platform/graphics/MediaPlayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsMediaPlayerPrivateh">trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsNativeImagePtrh">trunk/Source/WebCore/platform/graphics/NativeImagePtr.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCh">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoBitmapImageCairocpp">trunk/Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoCairoUtilitiescpp">trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoCairoUtilitiesh">trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoGraphicsContext3DCairocpp">trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoGraphicsContextCairocpp">trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoImageBufferCairocpp">trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgBitmapImageCGcpp">trunk/Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgGraphicsContext3DCGcpp">trunk/Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgGraphicsContextCGcpp">trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgImageBufferCGcpp">trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgImageSourceCGcpp">trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListItemscpp">trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListItemsh">trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecordercpp">trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecorderh">trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicseflGraphicsContext3DEflcpp">trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicseflIconEflcpp">trunk/Source/WebCore/platform/graphics/efl/IconEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerImageGStreamerCairocpp">trunk/Source/WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgtkIconGtkcpp">trunk/Source/WebCore/platform/graphics/gtk/IconGtk.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsiosIconIOSmm">trunk/Source/WebCore/platform/graphics/ios/IconIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacIconMacmm">trunk/Source/WebCore/platform/graphics/mac/IconMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacImageMacmm">trunk/Source/WebCore/platform/graphics/mac/ImageMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedSurfacecpp">trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedSurface.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedSurfaceh">trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedSurface.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinIconWincpp">trunk/Source/WebCore/platform/graphics/win/IconWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinImageCGWincpp">trunk/Source/WebCore/platform/graphics/win/ImageCGWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinImageCairoWincpp">trunk/Source/WebCore/platform/graphics/win/ImageCairoWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformimagedecodersImageDecoderh">trunk/Source/WebCore/platform/image-decoders/ImageDecoder.h</a></li>
<li><a href="#trunkSourceWebCoreplatformimagedecoderscairoImageDecoderCairocpp">trunk/Source/WebCore/platform/image-decoders/cairo/ImageDecoderCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformwinDragImageCGWincpp">trunk/Source/WebCore/platform/win/DragImageCGWin.cpp</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImagecpp">trunk/Source/WebCore/svg/graphics/SVGImage.cpp</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImageh">trunk/Source/WebCore/svg/graphics/SVGImage.h</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImageForContainercpp">trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImageForContainerh">trunk/Source/WebCore/svg/graphics/SVGImageForContainer.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacMiscWebCachemm">trunk/Source/WebKit/mac/Misc/WebCache.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinPluginsPluginViewh">trunk/Source/WebKit/win/Plugins/PluginView.h</a></li>
<li><a href="#trunkSourceWebKitwinPluginsPluginViewWincpp">trunk/Source/WebKit/win/Plugins/PluginViewWin.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedCoordinatedGraphicsWebCoordinatedSurfacecpp">trunk/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedCoordinatedGraphicsWebCoordinatedSurfaceh">trunk/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.h</a></li>
<li><a href="#trunkSourceWebKit2SharedShareableBitmapcpp">trunk/Source/WebKit2/Shared/ShareableBitmap.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedShareableBitmaph">trunk/Source/WebKit2/Shared/ShareableBitmap.h</a></li>
<li><a href="#trunkSourceWebKit2SharedcairoShareableBitmapCairocpp">trunk/Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedcgShareableBitmapCGcpp">trunk/Source/WebKit2/Shared/cg/ShareableBitmapCG.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsCoordinatedLayerTreeHostcpp">trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsCoordinatedLayerTreeHosth">trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsThreadedCoordinatedLayerTreeHostcpp">trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsThreadedCoordinatedLayerTreeHosth">trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/ChangeLog        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -1,3 +1,236 @@
</span><ins>+2016-03-24 Said Abou-Hallawa <sabouhallawa@apple,com>
+
+ Change NativeImagePtr for CG to be RetainPtr<CGImageRef>
+ https://bugs.webkit.org/show_bug.cgi?id=155412
+
+ Reviewed by Darin Adler.
+
+ Having NativeImagePtr as a raw pointer makes managing the life cycle of
+ the returned CGImageRef hard. A lot of work was done to ensure the CG
+ pointer is refcounted correctly. It was also not possible to move a
+ FrameData since calling the destructor was releasing the CGImageRef.
+
+ With this change, PassNativeImagePtr is not needed anymore. So all the
+ instance of PassNativeImagePtr can be replaced by NativeImagePtr.
+
+ * html/HTMLVideoElement.cpp:
+ (WebCore::HTMLVideoElement::nativeImageForCurrentTime):
+ * html/HTMLVideoElement.h: Replace PassNativeImagePtr with NativeImagePtr.
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::drawImage): Replace PassNativeImagePtr
+ with NativeImagePtr.
+
+ * loader/cache/MemoryCache.cpp:
+ (WebCore::MemoryCache::addImageToCache):
+ * loader/cache/MemoryCache.h: Remove USE(CG) and CFRetain(image) since
+ this code can compile on all platforms. The image refcount will be
+ incremented when the image is assigned to FrameData.m_image in the
+ BitmapImage constructor.
+
+ * loader/icon/IconDatabase.cpp:
+ (WebCore::IconDatabase::synchronousNativeIconForPageURL):
+ * loader/icon/IconDatabase.h:
+ * loader/icon/IconDatabaseBase.h: Replace PassNativeImagePtr with NativeImagePtr.
+
+ * platform/graphics/BitmapImage.cpp:
+ (WebCore::BitmapImage::haveFrameImageAtIndex):
+ (WebCore::BitmapImage::cacheFrame):
+ (WebCore::BitmapImage::ensureFrameIsCached):
+ (WebCore::BitmapImage::frameImageAtIndex):
+ (WebCore::BitmapImage::nativeImageForCurrentFrame):
+ (WebCore::BitmapImage::haveFrameAtIndex): Deleted.
+ (WebCore::BitmapImage::frameAtIndex): Deleted.
+ Replace PassNativeImagePtr with NativeImagePtr, m_frame with m_image and
+ *Frame* with *FrameImage*.
+
+ * platform/graphics/BitmapImage.h:
+ (WebCore::FrameData::FrameData):
+ A BitmapImage can have one or more FrameData. A FrameData member can be
+ named for shortness as "frame", "m_frames", etc. A FrameData can have
+ zero or one NativeImagePtr. A NativeImagePtr can be named as "image",
+ "m_image", etc.
+
+ * platform/graphics/GraphicsContext.h: Replace PassNativeImagePtr with
+ NativeImagePtr.
+
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/Icon.h:
+ Change the members of type CGImageRef to be RetainPtr<CGImageRef>.
+
+ * platform/graphics/Image.h:
+ (WebCore::Image::nativeImageForCurrentFrame):
+ (WebCore::Image::getNSImage):
+ (WebCore::Image::getTIFFRepresentation):
+ (WebCore::Image::getCGImageRef):
+ (WebCore::Image::getFirstCGImageRefOfSize):
+ (WebCore::Image::getCGImageArray):
+ (WebCore::Image::getGdkPixbuf):
+ (WebCore::Image::getEvasObject):
+ * platform/graphics/ImageBuffer.h:
+ * platform/graphics/ImageSource.cpp:
+ (WebCore::ImageSource::createFrameImageAtIndex):
+ (WebCore::ImageSource::createFrameAtIndex): Deleted.
+ * platform/graphics/ImageSource.h:
+ Change 0 to nullptr, PassRefPtr to RefPtr and PassNativeImagePtr to
+ NativeImagePtr.
+
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::nativeImageForCurrentTime):
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime):
+ Replace PassNativeImagePtr with NativeImagePtr.
+
+ * platform/graphics/NativeImagePtr.h:
+ Make NativeImagePtr a smart pointer for CG. Get rid of PassNativeImagePtr
+ since NativeImagePtr is now a smart pointer on all platforms.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime):
+ Replace PassNativeImagePtr with NativeImagePtr.
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::setContentsToImage):
+ Since Image::nativeImageForCurrentFrame() returns a RetainPtr, move it
+ to m_pendingContentsImage to remove the refcount churn.
+
+ * platform/graphics/cairo/BitmapImageCairo.cpp:
+ (WebCore::BitmapImage::BitmapImage):
+ (WebCore::BitmapImage::draw):
+ (WebCore::BitmapImage::checkForSolidColor):
+ (WebCore::FrameData::clear):
+ Replace m_frame with m_image and frame* with frameImage*.
+
+ * platform/graphics/cairo/CairoUtilities.cpp:
+ (WebCore::copyCairoImageSurface):
+ * platform/graphics/cairo/CairoUtilities.h:
+ Replace PassRefPtr with RefPtr.
+
+ * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
+ (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
+ Replace *Frame* with *FrameImage*.
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::drawNativeImage):
+ Replace PassNativeImagePtr with NativeImagePtr.
+
+ * platform/graphics/cairo/ImageBufferCairo.cpp:
+ (WebCore::ImageBuffer::copyImage): Create a new NativeImagePtr so it can
+ be moved to the BitmapImage::create().
+ (WebCore::copySurfaceToImageAndAdjustRect):
+ (WebCore::getImageData):
+ (WebCore::ImageBuffer::getUnmultipliedImageData):
+ (WebCore::ImageBuffer::getPremultipliedImageData):
+ Replace PassRefPtr with RefPtr.
+
+ * platform/graphics/cg/BitmapImageCG.cpp:
+ (WebCore::FrameData::clear): No need to call CGImageRelease(). Just assign
+ m_image to nullptr and CGImageRelease() will be called from the RetainPtr
+ destructor.
+
+ (WebCore::BitmapImage::BitmapImage):
+ (WebCore::BitmapImage::checkForSolidColor):
+ (WebCore::BitmapImage::getCGImageRef):
+ (WebCore::BitmapImage::getFirstCGImageRefOfSize):
+ (WebCore::BitmapImage::getCGImageArray):
+ (WebCore::BitmapImage::draw):
+ (WebCore::BitmapImage::copyUnscaledFrameImageAtIndex):
+ (WebCore::BitmapImage::copyUnscaledFrameAtIndex): Deleted.
+ Replace CGImageRef with RetainPtr<CGImageRef>. Replace *Frame* with
+ *FrameImage*.
+
+ * platform/graphics/cg/GraphicsContext3DCG.cpp:
+ (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
+ (WebCore::GraphicsContext3D::paintToCanvas):
+ Use m_cgImage.get() instead of m_cgImage when calling CG functions.
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::drawNativeImage):
+ (WebCore::GraphicsContext::drawPattern):
+ Replace PassNativeImagePtr with NativeImagePtr. Get the raw CGImageRef
+ from the NativeImagePtr when calling the CG functions.
+
+ * platform/graphics/cg/ImageBufferCG.cpp:
+ (WebCore::createBitmapImageAfterScalingIfNeeded): Move the image argument
+ when calling BitmapImage::create().
+
+ (WebCore::ImageBuffer::getUnmultipliedImageData):
+ (WebCore::ImageBuffer::getPremultipliedImageData):
+ Replace PassRefPtr with RefPtr.
+
+ * platform/graphics/cg/ImageSourceCG.cpp:
+ (WebCore::ImageSource::createFrameImageAtIndex):
+ (WebCore::ImageSource::createFrameAtIndex): Deleted.
+ Rename the function and simplify the code since the local variable
+ and the return value are both smart pointers.
+
+ * platform/graphics/displaylists/DisplayListItems.cpp:
+ (WebCore::DisplayList::DrawNativeImage::DrawNativeImage):
+ (WebCore::DisplayList::DrawNativeImage::apply):
+ * platform/graphics/displaylists/DisplayListItems.h:
+ (WebCore::DisplayList::DrawNativeImage::create):
+ * platform/graphics/displaylists/DisplayListRecorder.cpp:
+ (WebCore::DisplayList::Recorder::drawNativeImage):
+ * platform/graphics/displaylists/DisplayListRecorder.h:
+ Replace PassNativeImagePtr with NativeImagePtr and use constant reference.
+
+ * platform/graphics/efl/GraphicsContext3DEfl.cpp:
+ (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
+ Call a function with its new name.
+
+ * platform/graphics/efl/IconEfl.cpp:
+ (WebCore::Icon::createIconForFiles):
+ * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
+ (ImageGStreamer::ImageGStreamer):
+ * platform/graphics/gtk/IconGtk.cpp:
+ (WebCore::Icon::createIconForFiles):
+ * platform/graphics/ios/IconIOS.mm:
+ (WebCore::Icon::Icon):
+ (WebCore::Icon::createIconForFiles):
+ (WebCore::Icon::createIconForImage):
+ * platform/graphics/mac/IconMac.mm:
+ (WebCore::Icon::createIconForFiles):
+ Use smart pointers RetainPtr<CGImageRef> instead of raw pointers CGImageRef.
+ And change PassRefPtr to RefPtr and 0 to nullptr.
+
+ * platform/graphics/mac/ImageMac.mm:
+ (WebCore::BitmapImage::getTIFFRepresentation): Get the raw pointer from the
+ returned smart pointer.
+
+ * platform/graphics/texmap/coordinated/CoordinatedSurface.cpp:
+ (WebCore::CoordinatedSurface::create):
+ * platform/graphics/texmap/coordinated/CoordinatedSurface.h:
+ Replace PassRefPtr with RefPtr.
+
+ * platform/graphics/win/IconWin.cpp:
+ (WebCore::Icon::createIconForFiles): Change PassRefPtr to RefPtr.
+
+ * platform/graphics/win/ImageCGWin.cpp:
+ (WebCore::BitmapImage::create): Replace PassRefPtr with RefPtr.
+ (WebCore::BitmapImage::drawFrameMatchingSourceSize): Call the function
+ with its new name and get the raw pointer from the returned smart pointer.
+
+ * platform/graphics/win/ImageCairoWin.cpp:
+ (WebCore::BitmapImage::create): Replace PassRefPtr with ReftPtr and use
+ the move semantics for passing the argument to BitmapImage::create().
+ (WebCore::BitmapImage::drawFrameMatchingSourceSize): Call the function
+ with its new name.
+
+ * platform/image-decoders/ImageDecoder.h:
+ * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
+ (WebCore::ImageFrame::asNewNativeImage):
+ * platform/win/DragImageCGWin.cpp:
+ (WebCore::createDragImageFromImage):
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::nativeImageForCurrentFrame):
+ * svg/graphics/SVGImage.h:
+ * svg/graphics/SVGImageForContainer.cpp:
+ (WebCore::SVGImageForContainer::nativeImageForCurrentFrame):
+ * svg/graphics/SVGImageForContainer.h:
+ Replace PassNativeImagePtr with NativeImagePtr.
+
</ins><span class="cx"> 2016-03-24 Jer Noble <jer.noble@apple.com>
</span><span class="cx">
</span><span class="cx"> Safari Crashes if audio.src is changed while connected to AudioAnalyserNode
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLVideoElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLVideoElement.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLVideoElement.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/html/HTMLVideoElement.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -279,7 +279,7 @@
</span><span class="cx"> return player()->hasVideo() && player()->hasAvailableVideoFrame();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassNativeImagePtr HTMLVideoElement::nativeImageForCurrentTime()
</del><ins>+NativeImagePtr HTMLVideoElement::nativeImageForCurrentTime()
</ins><span class="cx"> {
</span><span class="cx"> if (!player())
</span><span class="cx"> return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLVideoElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLVideoElement.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLVideoElement.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/html/HTMLVideoElement.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> // Used by canvas to gain raw pixel access
</span><span class="cx"> void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&);
</span><span class="cx">
</span><del>- PassNativeImagePtr nativeImageForCurrentTime();
</del><ins>+ NativeImagePtr nativeImageForCurrentTime();
</ins><span class="cx">
</span><span class="cx"> // Used by WebGL to do GPU-GPU textures copy if possible.
</span><span class="cx"> // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defined in Source/WebCore/platform/graphics/MediaPlayer.h.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -1625,7 +1625,7 @@
</span><span class="cx"> checkOrigin(video);
</span><span class="cx">
</span><span class="cx"> #if USE(CG) || (ENABLE(ACCELERATED_2D_CANVAS) && USE(GSTREAMER_GL) && USE(CAIRO))
</span><del>- if (PassNativeImagePtr image = video->nativeImageForCurrentTime()) {
</del><ins>+ if (NativeImagePtr image = video->nativeImageForCurrentTime()) {
</ins><span class="cx"> c->drawNativeImage(image, FloatSize(video->videoWidth(), video->videoHeight()), dstRect, srcRect);
</span><span class="cx"> if (rectContainsCanvas(dstRect))
</span><span class="cx"> didDrawEntireCanvas();
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheMemoryCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/MemoryCache.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/MemoryCache.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -204,29 +204,24 @@
</span><span class="cx"> return m_capacity - deadCapacity();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if USE(CG)
-// FIXME: Remove the USE(CG) once we either make NativeImagePtr a smart pointer on all platforms or
-// remove the usage of CFRetain() in MemoryCache::addImageToCache() so as to make the code platform-independent.
</del><span class="cx"> static CachedImageClient& dummyCachedImageClient()
</span><span class="cx"> {
</span><span class="cx"> static NeverDestroyed<CachedImageClient> client;
</span><span class="cx"> return client;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool MemoryCache::addImageToCache(NativeImagePtr image, const URL& url, const String& domainForCachePartition)
</del><ins>+bool MemoryCache::addImageToCache(NativeImagePtr&& image, const URL& url, const String& domainForCachePartition)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(image);
</span><span class="cx"> SessionID sessionID = SessionID::defaultSessionID();
</span><span class="cx"> removeImageFromCache(url, domainForCachePartition); // Remove cache entry if it already exists.
</span><span class="cx">
</span><del>- RefPtr<BitmapImage> bitmapImage = BitmapImage::create(image, nullptr);
</del><ins>+ RefPtr<BitmapImage> bitmapImage = BitmapImage::create(WTFMove(image), nullptr);
</ins><span class="cx"> if (!bitmapImage)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<CachedImage> cachedImage = std::make_unique<CachedImage>(url, bitmapImage.get(), CachedImage::ManuallyCached, sessionID);
</span><span class="cx">
</span><del>- // Actual release of the CGImageRef is done in BitmapImage.
- CFRetain(image);
</del><span class="cx"> cachedImage->addClient(&dummyCachedImageClient());
</span><span class="cx"> cachedImage->setDecodedSize(bitmapImage->decodedSize());
</span><span class="cx"> #if ENABLE(CACHE_PARTITIONING)
</span><span class="lines">@@ -264,7 +259,6 @@
</span><span class="cx"> // resource may be deleted after this call.
</span><span class="cx"> downcast<CachedImage>(*resource).removeClient(&dummyCachedImageClient());
</span><span class="cx"> }
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> void MemoryCache::pruneLiveResources(bool shouldDestroyDecodedDataForAllLiveResources)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheMemoryCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/MemoryCache.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/MemoryCache.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -155,12 +155,8 @@
</span><span class="cx"> WEBCORE_EXPORT void getOriginsWithCache(SecurityOriginSet& origins);
</span><span class="cx"> WEBCORE_EXPORT HashSet<RefPtr<SecurityOrigin>> originsWithCache(SessionID) const;
</span><span class="cx">
</span><del>-#if USE(CG)
- // FIXME: Remove the USE(CG) once we either make NativeImagePtr a smart pointer on all platforms or
- // remove the usage of CFRetain() in MemoryCache::addImageToCache() so as to make the code platform-independent.
- WEBCORE_EXPORT bool addImageToCache(NativeImagePtr, const URL&, const String& domainForCachePartition);
</del><ins>+ WEBCORE_EXPORT bool addImageToCache(NativeImagePtr&&, const URL&, const String& domainForCachePartition);
</ins><span class="cx"> WEBCORE_EXPORT void removeImageFromCache(const URL&, const String& domainForCachePartition);
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> // pruneDead*() - Flush decoded and encoded data from resources not referenced by Web pages.
</span><span class="cx"> // pruneLive*() - Flush decoded data from resources still referenced by Web pages.
</span></span></pre></div>
<a id="trunkSourceWebCoreloadericonIconDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/icon/IconDatabase.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/icon/IconDatabase.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -300,7 +300,7 @@
</span><span class="cx"> return iconRecord->image(size);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassNativeImagePtr IconDatabase::synchronousNativeIconForPageURL(const String& pageURLOriginal, const IntSize& size)
</del><ins>+NativeImagePtr IconDatabase::synchronousNativeIconForPageURL(const String& pageURLOriginal, const IntSize& size)
</ins><span class="cx"> {
</span><span class="cx"> Image* icon = synchronousIconForPageURL(pageURLOriginal, size);
</span><span class="cx"> if (!icon)
</span></span></pre></div>
<a id="trunkSourceWebCoreloadericonIconDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/icon/IconDatabase.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/icon/IconDatabase.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> WEBCORE_EXPORT void setIconURLForPageURL(const String& iconURL, const String& pageURL) override;
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT Image* synchronousIconForPageURL(const String&, const IntSize&) override;
</span><del>- PassNativeImagePtr synchronousNativeIconForPageURL(const String& pageURLOriginal, const IntSize&) override;
</del><ins>+ NativeImagePtr synchronousNativeIconForPageURL(const String& pageURLOriginal, const IntSize&) override;
</ins><span class="cx"> WEBCORE_EXPORT String synchronousIconURLForPageURL(const String&) override;
</span><span class="cx"> bool synchronousIconDataKnownForIconURL(const String&) override;
</span><span class="cx"> WEBCORE_EXPORT IconLoadDecision synchronousLoadDecisionForIconURL(const String&, DocumentLoader*) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreloadericonIconDatabaseBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/icon/IconDatabaseBase.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/icon/IconDatabaseBase.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/loader/icon/IconDatabaseBase.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx"> virtual bool synchronousIconDataKnownForIconURL(const String&) { return false; }
</span><span class="cx"> virtual IconLoadDecision synchronousLoadDecisionForIconURL(const String&, DocumentLoader*) { return IconLoadNo; }
</span><span class="cx"> virtual Image* synchronousIconForPageURL(const String&, const IntSize&) { return nullptr; }
</span><del>- virtual PassNativeImagePtr synchronousNativeIconForPageURL(const String&, const IntSize&) { return nullptr; }
</del><ins>+ virtual NativeImagePtr synchronousNativeIconForPageURL(const String&, const IntSize&) { return nullptr; }
</ins><span class="cx">
</span><span class="cx"> // Asynchronous calls we should use to replace the above when supported.
</span><span class="cx"> virtual bool supportsAsynchronousMode() { return false; }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsBitmapImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> m_frameTimer->startOneShot(delay);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool BitmapImage::haveFrameAtIndex(size_t index)
</del><ins>+bool BitmapImage::haveFrameImageAtIndex(size_t index)
</ins><span class="cx"> {
</span><span class="cx"> if (index >= frameCount())
</span><span class="cx"> return false;
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx"> if (index >= m_frames.size())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- return m_frames[index].m_frame;
</del><ins>+ return m_frames[index].m_image;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool BitmapImage::hasSingleSecurityOrigin() const
</span><span class="lines">@@ -184,9 +184,9 @@
</span><span class="cx"> m_frames.grow(numFrames);
</span><span class="cx">
</span><span class="cx"> if (frameCaching == CacheMetadataAndFrame) {
</span><del>- m_frames[index].m_frame = m_source.createFrameAtIndex(index, subsamplingLevel);
</del><ins>+ m_frames[index].m_image = m_source.createFrameImageAtIndex(index, subsamplingLevel);
</ins><span class="cx"> m_frames[index].m_subsamplingLevel = subsamplingLevel;
</span><del>- if (numFrames == 1 && m_frames[index].m_frame)
</del><ins>+ if (numFrames == 1 && m_frames[index].m_image)
</ins><span class="cx"> checkForSolidColor();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx"> if (!subsamplingLevel && frameSize != m_size)
</span><span class="cx"> m_hasUniformFrameSize = false;
</span><span class="cx">
</span><del>- if (m_frames[index].m_frame) {
</del><ins>+ if (m_frames[index].m_image) {
</ins><span class="cx"> int deltaBytes = safeCast<int>(m_frames[index].m_frameBytes);
</span><span class="cx"> m_decodedSize += deltaBytes;
</span><span class="cx"> // The fully-decoded frame will subsume the partially decoded data used
</span><span class="lines">@@ -379,14 +379,14 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (index >= m_frames.size()
</span><del>- || (frameCaching == CacheMetadataAndFrame && !m_frames[index].m_frame)
</del><ins>+ || (frameCaching == CacheMetadataAndFrame && !m_frames[index].m_image)
</ins><span class="cx"> || (frameCaching == CacheMetadataOnly && !m_frames[index].m_haveMetadata))
</span><span class="cx"> cacheFrame(index, 0, frameCaching);
</span><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassNativeImagePtr BitmapImage::frameAtIndex(size_t index, float presentationScaleHint)
</del><ins>+NativeImagePtr BitmapImage::frameImageAtIndex(size_t index, float presentationScaleHint)
</ins><span class="cx"> {
</span><span class="cx"> if (index >= frameCount())
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx">
</span><span class="cx"> // We may have cached a frame with a higher subsampling level, in which case we need to
</span><span class="cx"> // re-decode with a lower level.
</span><del>- if (index < m_frames.size() && m_frames[index].m_frame && subsamplingLevel < m_frames[index].m_subsamplingLevel) {
</del><ins>+ if (index < m_frames.size() && m_frames[index].m_image && subsamplingLevel < m_frames[index].m_subsamplingLevel) {
</ins><span class="cx"> // If the image is already cached, but at too small a size, re-decode a larger version.
</span><span class="cx"> int sizeChange = -m_frames[index].m_frameBytes;
</span><span class="cx"> m_frames[index].clear(true);
</span><span class="lines">@@ -406,10 +406,10 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // If we haven't fetched a frame yet, do so.
</span><del>- if (index >= m_frames.size() || !m_frames[index].m_frame)
</del><ins>+ if (index >= m_frames.size() || !m_frames[index].m_image)
</ins><span class="cx"> cacheFrame(index, subsamplingLevel, CacheMetadataAndFrame);
</span><span class="cx">
</span><del>- return m_frames[index].m_frame;
</del><ins>+ return m_frames[index].m_image;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool BitmapImage::frameIsCompleteAtIndex(size_t index)
</span><span class="lines">@@ -428,9 +428,9 @@
</span><span class="cx"> return m_frames[index].m_duration;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassNativeImagePtr BitmapImage::nativeImageForCurrentFrame()
</del><ins>+NativeImagePtr BitmapImage::nativeImageForCurrentFrame()
</ins><span class="cx"> {
</span><del>- return frameAtIndex(currentFrame());
</del><ins>+ return frameImageAtIndex(currentFrame());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool BitmapImage::frameHasAlphaAtIndex(size_t index)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsBitmapImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/BitmapImage.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -65,16 +65,14 @@
</span><span class="cx"> // ================================================
</span><span class="cx">
</span><span class="cx"> struct FrameData {
</span><del>- WTF_MAKE_NONCOPYABLE(FrameData);
</del><span class="cx"> public:
</span><span class="cx"> FrameData()
</span><del>- : m_frame(0)
- , m_orientation(DefaultImageOrientation)
</del><ins>+ : m_orientation(DefaultImageOrientation)
</ins><span class="cx"> , m_subsamplingLevel(0)
</span><span class="cx"> , m_duration(0)
</span><span class="cx"> , m_haveMetadata(false)
</span><span class="cx"> , m_isComplete(false)
</span><del>- , m_hasAlpha(true)
</del><ins>+ , m_hasAlpha(true)
</ins><span class="cx"> , m_frameBytes(0)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -88,7 +86,7 @@
</span><span class="cx"> // Returns whether there was cached image data to clear.
</span><span class="cx"> bool clear(bool clearMetadata);
</span><span class="cx">
</span><del>- NativeImagePtr m_frame;
</del><ins>+ NativeImagePtr m_image;
</ins><span class="cx"> ImageOrientation m_orientation;
</span><span class="cx"> SubsamplingLevel m_subsamplingLevel;
</span><span class="cx"> float m_duration;
</span><span class="lines">@@ -108,16 +106,16 @@
</span><span class="cx"> friend class GradientImage;
</span><span class="cx"> friend class GraphicsContext;
</span><span class="cx"> public:
</span><del>- static Ref<BitmapImage> create(PassNativeImagePtr nativeImage, ImageObserver* observer = 0)
</del><ins>+ static Ref<BitmapImage> create(NativeImagePtr&& nativeImage, ImageObserver* observer = nullptr)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new BitmapImage(nativeImage, observer));
</del><ins>+ return adoptRef(*new BitmapImage(WTFMove(nativeImage), observer));
</ins><span class="cx"> }
</span><del>- static Ref<BitmapImage> create(ImageObserver* observer = 0)
</del><ins>+ static Ref<BitmapImage> create(ImageObserver* observer = nullptr)
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(*new BitmapImage(observer));
</span><span class="cx"> }
</span><span class="cx"> #if PLATFORM(WIN)
</span><del>- WEBCORE_EXPORT static PassRefPtr<BitmapImage> create(HBITMAP);
</del><ins>+ WEBCORE_EXPORT static RefPtr<BitmapImage> create(HBITMAP);
</ins><span class="cx"> #endif
</span><span class="cx"> virtual ~BitmapImage();
</span><span class="cx">
</span><span class="lines">@@ -172,7 +170,7 @@
</span><span class="cx"> Evas_Object* getEvasObject(Evas*) override;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- PassNativeImagePtr nativeImageForCurrentFrame() override;
</del><ins>+ NativeImagePtr nativeImageForCurrentFrame() override;
</ins><span class="cx"> ImageOrientation orientationForCurrentFrame() override { return frameOrientationAtIndex(currentFrame()); }
</span><span class="cx">
</span><span class="cx"> bool currentFrameKnownToBeOpaque() override;
</span><span class="lines">@@ -199,8 +197,8 @@
</span><span class="cx"> Certain // The repetition count is known to be correct.
</span><span class="cx"> };
</span><span class="cx">
</span><del>- WEBCORE_EXPORT BitmapImage(PassNativeImagePtr, ImageObserver* = 0);
- WEBCORE_EXPORT BitmapImage(ImageObserver* = 0);
</del><ins>+ WEBCORE_EXPORT BitmapImage(NativeImagePtr&&, ImageObserver* = nullptr);
+ WEBCORE_EXPORT BitmapImage(ImageObserver* = nullptr);
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx"> void drawFrameMatchingSourceSize(GraphicsContext&, const FloatRect& dstRect, const IntSize& srcSize, CompositeOperator) override;
</span><span class="lines">@@ -214,10 +212,10 @@
</span><span class="cx">
</span><span class="cx"> size_t frameCount();
</span><span class="cx">
</span><del>- PassNativeImagePtr frameAtIndex(size_t, float presentationScaleHint = 1);
- PassNativeImagePtr copyUnscaledFrameAtIndex(size_t);
</del><ins>+ NativeImagePtr frameImageAtIndex(size_t, float presentationScaleHint = 1);
+ NativeImagePtr copyUnscaledFrameImageAtIndex(size_t);
</ins><span class="cx">
</span><del>- bool haveFrameAtIndex(size_t);
</del><ins>+ bool haveFrameImageAtIndex(size_t);
</ins><span class="cx">
</span><span class="cx"> bool frameIsCompleteAtIndex(size_t);
</span><span class="cx"> float frameDurationAtIndex(size_t);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx"> const GraphicsContextState& state() const { return m_state; }
</span><span class="cx">
</span><span class="cx"> #if USE(CG) || USE(CAIRO)
</span><del>- WEBCORE_EXPORT void drawNativeImage(PassNativeImagePtr, const FloatSize& selfSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, ImageOrientation = DefaultImageOrientation);
</del><ins>+ WEBCORE_EXPORT void drawNativeImage(const NativeImagePtr&, const FloatSize& selfSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, ImageOrientation = DefaultImageOrientation);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if USE(CG)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContext3Dh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -1245,7 +1245,7 @@
</span><span class="cx"> ImageSource* m_decoder;
</span><span class="cx"> RefPtr<cairo_surface_t> m_imageSurface;
</span><span class="cx"> #elif USE(CG)
</span><del>- CGImageRef m_cgImage;
</del><ins>+ RetainPtr<CGImageRef> m_cgImage;
</ins><span class="cx"> RetainPtr<CGImageRef> m_decodedImage;
</span><span class="cx"> RetainPtr<CFDataRef> m_pixelData;
</span><span class="cx"> std::unique_ptr<uint8_t[]> m_formalizedRGBA8Data;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsIconh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Icon.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Icon.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/Icon.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -22,8 +22,8 @@
</span><span class="cx"> #define Icon_h
</span><span class="cx">
</span><span class="cx"> #include <wtf/Forward.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</span><ins>+#include <wtf/RefPtr.h>
</ins><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="lines">@@ -45,19 +45,19 @@
</span><span class="cx">
</span><span class="cx"> class Icon : public RefCounted<Icon> {
</span><span class="cx"> public:
</span><del>- WEBCORE_EXPORT static PassRefPtr<Icon> createIconForFiles(const Vector<String>& filenames);
</del><ins>+ WEBCORE_EXPORT static RefPtr<Icon> createIconForFiles(const Vector<String>& filenames);
</ins><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT ~Icon();
</span><span class="cx">
</span><span class="cx"> void paint(GraphicsContext&, const FloatRect&);
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(WIN)
</span><del>- static PassRefPtr<Icon> create(HICON hIcon) { return adoptRef(new Icon(hIcon)); }
</del><ins>+ static RefPtr<Icon> create(HICON hIcon) { return adoptRef(new Icon(hIcon)); }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> // FIXME: Make this work for non-iOS ports and remove the PLATFORM(IOS)-guard.
</span><del>- WEBCORE_EXPORT static PassRefPtr<Icon> createIconForImage(NativeImagePtr);
</del><ins>+ WEBCORE_EXPORT static RefPtr<Icon> createIconForImage(const NativeImagePtr&);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>- Icon(CGImageRef);
</del><ins>+ Icon(const RetainPtr<CGImageRef>&);
</ins><span class="cx"> RetainPtr<CGImageRef> m_cgImage;
</span><span class="cx"> #elif PLATFORM(MAC)
</span><span class="cx"> Icon(NSImage*);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Image.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Image.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/Image.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -135,23 +135,23 @@
</span><span class="cx">
</span><span class="cx"> enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile };
</span><span class="cx">
</span><del>- virtual PassNativeImagePtr nativeImageForCurrentFrame() { return 0; }
</del><ins>+ virtual NativeImagePtr nativeImageForCurrentFrame() { return nullptr; }
</ins><span class="cx"> virtual ImageOrientation orientationForCurrentFrame() { return ImageOrientation(); }
</span><span class="cx">
</span><span class="cx"> // Accessors for native image formats.
</span><span class="cx">
</span><span class="cx"> #if USE(APPKIT)
</span><del>- virtual NSImage* getNSImage() { return 0; }
</del><ins>+ virtual NSImage* getNSImage() { return nullptr; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>- virtual CFDataRef getTIFFRepresentation() { return 0; }
</del><ins>+ virtual CFDataRef getTIFFRepresentation() { return nullptr; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if USE(CG)
</span><del>- virtual CGImageRef getCGImageRef() { return 0; }
- virtual CGImageRef getFirstCGImageRefOfSize(const IntSize&) { return 0; }
- virtual RetainPtr<CFArrayRef> getCGImageArray() { return 0; }
</del><ins>+ virtual CGImageRef getCGImageRef() { return nullptr; }
+ virtual CGImageRef getFirstCGImageRefOfSize(const IntSize&) { return nullptr; }
+ virtual RetainPtr<CFArrayRef> getCGImageArray() { return nullptr; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="lines">@@ -160,11 +160,11 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(GTK)
</span><del>- virtual GdkPixbuf* getGdkPixbuf() { return 0; }
</del><ins>+ virtual GdkPixbuf* getGdkPixbuf() { return nullptr; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(EFL)
</span><del>- virtual Evas_Object* getEvasObject(Evas*) { return 0; }
</del><ins>+ virtual Evas_Object* getEvasObject(Evas*) { return nullptr; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> virtual void drawPattern(GraphicsContext&, const FloatRect& srcRect, const AffineTransform& patternTransform,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImageBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ImageBuffer.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> #include "PlatformLayer.h"
</span><span class="cx"> #include <runtime/Uint8ClampedArray.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><ins>+#include <wtf/RefPtr.h>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -101,8 +101,8 @@
</span><span class="cx">
</span><span class="cx"> enum CoordinateSystem { LogicalCoordinateSystem, BackingStoreCoordinateSystem };
</span><span class="cx">
</span><del>- PassRefPtr<Uint8ClampedArray> getUnmultipliedImageData(const IntRect&, CoordinateSystem = LogicalCoordinateSystem) const;
- PassRefPtr<Uint8ClampedArray> getPremultipliedImageData(const IntRect&, CoordinateSystem = LogicalCoordinateSystem) const;
</del><ins>+ RefPtr<Uint8ClampedArray> getUnmultipliedImageData(const IntRect&, CoordinateSystem = LogicalCoordinateSystem) const;
+ RefPtr<Uint8ClampedArray> getPremultipliedImageData(const IntRect&, CoordinateSystem = LogicalCoordinateSystem) const;
</ins><span class="cx">
</span><span class="cx"> void putByteArray(Multiply multiplied, Uint8ClampedArray*, const IntSize& sourceSize, const IntRect& sourceRect, const IntPoint& destPoint, CoordinateSystem = LogicalCoordinateSystem);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImageSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ImageSource.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ImageSource.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/ImageSource.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -148,19 +148,19 @@
</span><span class="cx"> return m_decoder ? m_decoder->frameCount() : 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassNativeImagePtr ImageSource::createFrameAtIndex(size_t index, SubsamplingLevel)
</del><ins>+NativeImagePtr ImageSource::createFrameImageAtIndex(size_t index, SubsamplingLevel)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_decoder)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> ImageFrame* buffer = m_decoder->frameBufferAtIndex(index);
</span><span class="cx"> if (!buffer || buffer->status() == ImageFrame::FrameEmpty)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> // Zero-height images can cause problems for some ports. If we have an
</span><span class="cx"> // empty image dimension, just bail.
</span><span class="cx"> if (size().isEmpty())
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> // Return the buffer contents as a native image. For some ports, the data
</span><span class="cx"> // is already in a native container, and this just increments its refcount.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImageSourceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ImageSource.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ImageSource.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/ImageSource.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx"> // decoded frames.
</span><span class="cx"> //
</span><span class="cx"> // Callers should not call clear(false, n) and subsequently call
</span><del>- // createFrameAtIndex(m) with m < n, unless they first call clear(true).
</del><ins>+ // createFrameImageAtIndex(m) with m < n, unless they first call clear(true).
</ins><span class="cx"> // This ensures that stateful ImageSources/decoders will work properly.
</span><span class="cx"> //
</span><span class="cx"> // The |data| and |allDataReceived| parameters should be supplied by callers
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx">
</span><span class="cx"> // Callers should not call this after calling clear() with a higher index;
</span><span class="cx"> // see comments on clear() above.
</span><del>- PassNativeImagePtr createFrameAtIndex(size_t, SubsamplingLevel = 0);
</del><ins>+ NativeImagePtr createFrameImageAtIndex(size_t, SubsamplingLevel = 0);
</ins><span class="cx">
</span><span class="cx"> float frameDurationAtIndex(size_t);
</span><span class="cx"> bool frameHasAlphaAtIndex(size_t); // Whether or not the frame actually used any alpha.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsMediaPlayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -837,7 +837,7 @@
</span><span class="cx"> return m_private->copyVideoTextureToPlatformTexture(context, texture, target, level, internalFormat, format, type, premultiplyAlpha, flipY);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassNativeImagePtr MediaPlayer::nativeImageForCurrentTime()
</del><ins>+NativeImagePtr MediaPlayer::nativeImageForCurrentTime()
</ins><span class="cx"> {
</span><span class="cx"> return m_private->nativeImageForCurrentTime();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsMediaPlayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/MediaPlayer.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -423,7 +423,7 @@
</span><span class="cx"> // http://src.chromium.org/viewvc/chrome/trunk/src/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc via shaders.
</span><span class="cx"> bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject texture, GC3Denum target, GC3Dint level, GC3Denum internalFormat, GC3Denum format, GC3Denum type, bool premultiplyAlpha, bool flipY);
</span><span class="cx">
</span><del>- PassNativeImagePtr nativeImageForCurrentTime();
</del><ins>+ NativeImagePtr nativeImageForCurrentTime();
</ins><span class="cx">
</span><span class="cx"> using MediaPlayerEnums::NetworkState;
</span><span class="cx"> NetworkState networkState();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsMediaPlayerPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx">
</span><span class="cx"> virtual void paintCurrentFrameInContext(GraphicsContext& c, const FloatRect& r) { paint(c, r); }
</span><span class="cx"> virtual bool copyVideoTextureToPlatformTexture(GraphicsContext3D*, Platform3DObject, GC3Denum, GC3Dint, GC3Denum, GC3Denum, GC3Denum, bool, bool) { return false; }
</span><del>- virtual PassNativeImagePtr nativeImageForCurrentTime() { return nullptr; }
</del><ins>+ virtual NativeImagePtr nativeImageForCurrentTime() { return nullptr; }
</ins><span class="cx">
</span><span class="cx"> virtual void setPreload(MediaPlayer::Preload) { }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsNativeImagePtrh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/NativeImagePtr.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/NativeImagePtr.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/NativeImagePtr.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #define NativeImagePtr_h
</span><span class="cx">
</span><span class="cx"> #if USE(CG)
</span><ins>+#include <wtf/RetainPtr.h>
</ins><span class="cx"> typedef struct CGImage* CGImageRef;
</span><span class="cx"> #elif USE(CAIRO)
</span><span class="cx"> #include "RefPtrCairo.h"
</span><span class="lines">@@ -38,21 +39,14 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-// FIXME: NativeImagePtr and PassNativeImagePtr should be smart
-// pointers (see SVGImage::nativeImageForCurrentFrame()).
</del><span class="cx"> #if USE(CG)
</span><del>-typedef CGImageRef NativeImagePtr;
</del><ins>+typedef RetainPtr<CGImageRef> NativeImagePtr;
</ins><span class="cx"> #elif USE(CAIRO)
</span><span class="cx"> typedef RefPtr<cairo_surface_t> NativeImagePtr;
</span><del>-typedef PassRefPtr<cairo_surface_t> PassNativeImagePtr;
</del><span class="cx"> #elif USE(WINGDI)
</span><span class="cx"> typedef RefPtr<SharedBitmap> NativeImagePtr;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if !USE(CAIRO)
-typedef NativeImagePtr PassNativeImagePtr;
-#endif
-
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx"> void updateLastImage();
</span><span class="cx"> bool videoOutputHasAvailableFrame();
</span><span class="cx"> void paintWithVideoOutput(GraphicsContext&, const FloatRect&);
</span><del>- PassNativeImagePtr nativeImageForCurrentTime() override;
</del><ins>+ NativeImagePtr nativeImageForCurrentTime() override;
</ins><span class="cx"> void waitForVideoOutputMediaDataWillChange();
</span><span class="cx">
</span><span class="cx"> void createOpenGLVideoOutput();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -2346,10 +2346,10 @@
</span><span class="cx"> return m_videoTextureCopier->copyVideoTextureToPlatformTexture(videoTexture.get(), width, height, outputTexture, outputTarget, level, internalFormat, format, type, premultiplyAlpha, flipY);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassNativeImagePtr MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime()
</del><ins>+NativeImagePtr MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime()
</ins><span class="cx"> {
</span><span class="cx"> updateLastImage();
</span><del>- return m_lastImage.get();
</del><ins>+ return m_lastImage;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -1008,16 +1008,16 @@
</span><span class="cx"> void GraphicsLayerCA::setContentsToImage(Image* image)
</span><span class="cx"> {
</span><span class="cx"> if (image) {
</span><del>- CGImageRef newImage = image->nativeImageForCurrentFrame();
</del><ins>+ auto newImage = image->nativeImageForCurrentFrame();
</ins><span class="cx"> if (!newImage)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // FIXME: probably don't need m_uncorrectedContentsImage at all now.
</span><del>- if (m_uncorrectedContentsImage && m_uncorrectedContentsImage.get() == newImage)
</del><ins>+ if (m_uncorrectedContentsImage == newImage)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- m_uncorrectedContentsImage = newImage;
- m_pendingContentsImage = newImage;
</del><ins>+ m_uncorrectedContentsImage = WTFMove(newImage);
+ m_pendingContentsImage = m_uncorrectedContentsImage;
</ins><span class="cx">
</span><span class="cx"> m_contentsLayerPurpose = ContentsLayerForImage;
</span><span class="cx"> if (!m_contentsLayer)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoBitmapImageCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-BitmapImage::BitmapImage(PassRefPtr<cairo_surface_t> nativeImage, ImageObserver* observer)
</del><ins>+BitmapImage::BitmapImage(RefPtr<cairo_surface_t>&& nativeImage, ImageObserver* observer)
</ins><span class="cx"> : Image(observer)
</span><span class="cx"> , m_size(cairoSurfaceSize(nativeImage.get()))
</span><span class="cx"> , m_minimumSubsamplingLevel(0)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> {
</span><span class="cx"> m_frames.grow(1);
</span><span class="cx"> m_frames[0].m_hasAlpha = cairo_surface_get_content(nativeImage.get()) != CAIRO_CONTENT_COLOR;
</span><del>- m_frames[0].m_frame = nativeImage;
</del><ins>+ m_frames[0].m_image = WTFMove(nativeImage);
</ins><span class="cx"> m_frames[0].m_haveMetadata = true;
</span><span class="cx">
</span><span class="cx"> checkForSolidColor();
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">
</span><span class="cx"> startAnimation();
</span><span class="cx">
</span><del>- RefPtr<cairo_surface_t> surface = frameAtIndex(m_currentFrame);
</del><ins>+ auto surface = frameImageAtIndex(m_currentFrame);
</ins><span class="cx"> if (!surface) // If it's too early we won't have an image yet.
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx"> if (frameCount() > 1)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- RefPtr<cairo_surface_t> surface = frameAtIndex(m_currentFrame);
</del><ins>+ auto surface = frameImageAtIndex(m_currentFrame);
</ins><span class="cx"> if (!surface) // If it's too early we won't have an image yet.
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -158,8 +158,8 @@
</span><span class="cx"> if (clearMetadata)
</span><span class="cx"> m_haveMetadata = false;
</span><span class="cx">
</span><del>- if (m_frame) {
- m_frame = nullptr;
</del><ins>+ if (m_image) {
+ m_image = nullptr;
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoCairoUtilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -217,7 +217,7 @@
</span><span class="cx"> cairo_restore(cr);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<cairo_surface_t> copyCairoImageSurface(cairo_surface_t* originalSurface)
</del><ins>+RefPtr<cairo_surface_t> copyCairoImageSurface(cairo_surface_t* originalSurface)
</ins><span class="cx"> {
</span><span class="cx"> // Cairo doesn't provide a way to copy a cairo_surface_t.
</span><span class="cx"> // See http://lists.cairographics.org/archives/cairo/2007-June/010877.html
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoCairoUtilitiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> cairo_operator_t toCairoOperator(BlendMode blendOp);
</span><span class="cx"> void drawPatternToCairoContext(cairo_t* cr, cairo_surface_t* image, const IntSize& imageSize, const FloatRect& tileRect,
</span><span class="cx"> const AffineTransform& patternTransform, const FloatPoint& phase, cairo_operator_t op, const FloatRect& destRect);
</span><del>-PassRefPtr<cairo_surface_t> copyCairoImageSurface(cairo_surface_t*);
</del><ins>+RefPtr<cairo_surface_t> copyCairoImageSurface(cairo_surface_t*);
</ins><span class="cx">
</span><span class="cx"> void copyRectFromCairoSurfaceToContext(cairo_surface_t* from, cairo_t* to, const IntSize& offset, const IntRect&);
</span><span class="cx"> void copyRectFromOneSurfaceToAnother(cairo_surface_t* from, cairo_surface_t* to, const IntSize& offset, const IntRect&, const IntSize& = IntSize(), cairo_operator_t = CAIRO_OPERATOR_OVER);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoGraphicsContext3DCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx"> decoder.setData(m_image->data(), true);
</span><span class="cx"> if (!decoder.frameCount() || !decoder.frameIsCompleteAtIndex(0))
</span><span class="cx"> return false;
</span><del>- m_imageSurface = decoder.createFrameAtIndex(0);
</del><ins>+ m_imageSurface = decoder.createFrameImageAtIndex(0);
</ins><span class="cx"> } else {
</span><span class="cx"> m_imageSurface = m_image->nativeImageForCurrentFrame();
</span><span class="cx"> // 1. For texImage2D with HTMLVideoElment input, assume no PremultiplyAlpha had been applied and the alpha value is 0xFF for each pixel,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoGraphicsContextCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -259,18 +259,16 @@
</span><span class="cx"> cairo_restore(cr);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::drawNativeImage(PassNativeImagePtr imagePtr, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, ImageOrientation orientation)
</del><ins>+void GraphicsContext::drawNativeImage(const NativeImagePtr& image, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, ImageOrientation orientation)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (isRecording()) {
</span><del>- m_displayListRecorder->drawNativeImage(imagePtr, imageSize, destRect, srcRect, op, blendMode, orientation);
</del><ins>+ m_displayListRecorder->drawNativeImage(image, imageSize, destRect, srcRect, op, blendMode, orientation);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- NativeImagePtr image = imagePtr;
-
</del><span class="cx"> platformContext()->save();
</span><span class="cx">
</span><span class="cx"> // Set the compositing operation.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoImageBufferCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -235,7 +235,7 @@
</span><span class="cx"> return BitmapImage::create(copyCairoImageSurface(m_data.m_surface.get()));
</span><span class="cx">
</span><span class="cx"> // BitmapImage will release the passed in surface on destruction
</span><del>- return BitmapImage::create(m_data.m_surface);
</del><ins>+ return BitmapImage::create(RefPtr<cairo_surface_t>(m_data.m_surface));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> BackingStoreCopy ImageBuffer::fastCopyImageMode()
</span><span class="lines">@@ -286,7 +286,7 @@
</span><span class="cx"> cairo_surface_mark_dirty_rectangle(m_data.m_surface.get(), 0, 0, m_size.width(), m_size.height());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<cairo_surface_t> copySurfaceToImageAndAdjustRect(cairo_surface_t* surface, IntRect& rect)
</del><ins>+RefPtr<cairo_surface_t> copySurfaceToImageAndAdjustRect(cairo_surface_t* surface, IntRect& rect)
</ins><span class="cx"> {
</span><span class="cx"> cairo_surface_type_t surfaceType = cairo_surface_get_type(surface);
</span><span class="cx">
</span><span class="lines">@@ -301,7 +301,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <Multiply multiplied>
</span><del>-PassRefPtr<Uint8ClampedArray> getImageData(const IntRect& rect, const ImageBufferData& data, const IntSize& size)
</del><ins>+RefPtr<Uint8ClampedArray> getImageData(const IntRect& rect, const ImageBufferData& data, const IntSize& size)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<Uint8ClampedArray> result = Uint8ClampedArray::createUninitialized(rect.width() * rect.height() * 4);
</span><span class="cx">
</span><span class="lines">@@ -377,12 +377,12 @@
</span><span class="cx"> return result.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Uint8ClampedArray> ImageBuffer::getUnmultipliedImageData(const IntRect& rect, CoordinateSystem) const
</del><ins>+RefPtr<Uint8ClampedArray> ImageBuffer::getUnmultipliedImageData(const IntRect& rect, CoordinateSystem) const
</ins><span class="cx"> {
</span><span class="cx"> return getImageData<Unmultiplied>(rect, m_data, m_size);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Uint8ClampedArray> ImageBuffer::getPremultipliedImageData(const IntRect& rect, CoordinateSystem) const
</del><ins>+RefPtr<Uint8ClampedArray> ImageBuffer::getPremultipliedImageData(const IntRect& rect, CoordinateSystem) const
</ins><span class="cx"> {
</span><span class="cx"> return getImageData<Premultiplied>(rect, m_data, m_size);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgBitmapImageCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -58,18 +58,17 @@
</span><span class="cx"> m_orientation = DefaultImageOrientation;
</span><span class="cx"> m_subsamplingLevel = 0;
</span><span class="cx">
</span><del>- if (m_frame) {
</del><ins>+ if (m_image) {
</ins><span class="cx"> #if CACHE_SUBIMAGES
</span><del>- subimageCache().clearImage(m_frame);
</del><ins>+ subimageCache().clearImage(m_image.get());
</ins><span class="cx"> #endif
</span><del>- CGImageRelease(m_frame);
- m_frame = 0;
</del><ins>+ m_image = nullptr;
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-BitmapImage::BitmapImage(CGImageRef cgImage, ImageObserver* observer)
</del><ins>+BitmapImage::BitmapImage(RetainPtr<CGImageRef>&& image, ImageObserver* observer)
</ins><span class="cx"> : Image(observer)
</span><span class="cx"> , m_minimumSubsamplingLevel(0)
</span><span class="cx"> , m_imageOrientation(OriginTopLeft)
</span><span class="lines">@@ -89,8 +88,8 @@
</span><span class="cx"> , m_sizeAvailable(true)
</span><span class="cx"> , m_haveFrameCount(true)
</span><span class="cx"> {
</span><del>- CGFloat width = CGImageGetWidth(cgImage);
- CGFloat height = CGImageGetHeight(cgImage);
</del><ins>+ CGFloat width = CGImageGetWidth(image.get());
+ CGFloat height = CGImageGetHeight(image.get());
</ins><span class="cx"> m_decodedSize = width * height * 4;
</span><span class="cx"> m_size = IntSize(width, height);
</span><span class="cx">
</span><span class="lines">@@ -99,7 +98,7 @@
</span><span class="cx"> m_sizeRespectingOrientation = m_size;
</span><span class="cx">
</span><span class="cx"> m_frames.grow(1);
</span><del>- m_frames[0].m_frame = CGImageRetain(cgImage);
</del><ins>+ m_frames[0].m_image = WTFMove(image);
</ins><span class="cx"> m_frames[0].m_hasAlpha = true;
</span><span class="cx"> m_frames[0].m_haveMetadata = true;
</span><span class="cx">
</span><span class="lines">@@ -136,7 +135,7 @@
</span><span class="cx"> if (frameCount() > 1)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (!haveFrameAtIndex(0)) {
</del><ins>+ if (!haveFrameImageAtIndex(0)) {
</ins><span class="cx"> IntSize size = m_source.frameSizeAtIndex(0, 0);
</span><span class="cx"> if (size.width() != 1 || size.height() != 1)
</span><span class="cx"> return;
</span><span class="lines">@@ -147,7 +146,7 @@
</span><span class="cx">
</span><span class="cx"> CGImageRef image = nullptr;
</span><span class="cx"> if (m_frames.size())
</span><del>- image = m_frames[0].m_frame;
</del><ins>+ image = m_frames[0].m_image.get();
</ins><span class="cx">
</span><span class="cx"> if (!image)
</span><span class="cx"> return;
</span><span class="lines">@@ -173,14 +172,14 @@
</span><span class="cx">
</span><span class="cx"> CGImageRef BitmapImage::getCGImageRef()
</span><span class="cx"> {
</span><del>- return frameAtIndex(0);
</del><ins>+ return frameImageAtIndex(0).get();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CGImageRef BitmapImage::getFirstCGImageRefOfSize(const IntSize& size)
</span><span class="cx"> {
</span><span class="cx"> size_t count = frameCount();
</span><span class="cx"> for (size_t i = 0; i < count; ++i) {
</span><del>- CGImageRef cgImage = frameAtIndex(i);
</del><ins>+ CGImageRef cgImage = frameImageAtIndex(i).get();
</ins><span class="cx"> if (cgImage && IntSize(CGImageGetWidth(cgImage), CGImageGetHeight(cgImage)) == size)
</span><span class="cx"> return cgImage;
</span><span class="cx"> }
</span><span class="lines">@@ -193,11 +192,11 @@
</span><span class="cx"> {
</span><span class="cx"> size_t count = frameCount();
</span><span class="cx"> if (!count)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> CFMutableArrayRef array = CFArrayCreateMutable(NULL, count, &kCFTypeArrayCallBacks);
</span><span class="cx"> for (size_t i = 0; i < count; ++i) {
</span><del>- if (CGImageRef currFrame = frameAtIndex(i))
</del><ins>+ if (CGImageRef currFrame = frameImageAtIndex(i).get())
</ins><span class="cx"> CFArrayAppendValue(array, currFrame);
</span><span class="cx"> }
</span><span class="cx"> return adoptCF(array);
</span><span class="lines">@@ -214,12 +213,12 @@
</span><span class="cx"> RetainPtr<CGImageRef> image;
</span><span class="cx"> // Never use subsampled images for drawing into PDF contexts.
</span><span class="cx"> if (wkCGContextIsPDFContext(ctxt.platformContext()))
</span><del>- image = adoptCF(copyUnscaledFrameAtIndex(m_currentFrame));
</del><ins>+ image = copyUnscaledFrameImageAtIndex(m_currentFrame);
</ins><span class="cx"> else {
</span><span class="cx"> CGRect transformedDestinationRect = CGRectApplyAffineTransform(destRect, CGContextGetCTM(ctxt.platformContext()));
</span><span class="cx"> float subsamplingScale = std::min<float>(1, std::max(transformedDestinationRect.size.width / srcRect.width(), transformedDestinationRect.size.height / srcRect.height()));
</span><span class="cx">
</span><del>- image = frameAtIndex(m_currentFrame, subsamplingScale);
</del><ins>+ image = frameImageAtIndex(m_currentFrame, subsamplingScale);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!image) // If it's too early we won't have an image yet.
</span><span class="lines">@@ -245,24 +244,24 @@
</span><span class="cx"> if (description.respectImageOrientation() == RespectImageOrientation)
</span><span class="cx"> orientation = frameOrientationAtIndex(m_currentFrame);
</span><span class="cx">
</span><del>- ctxt.drawNativeImage(image.get(), imageSize, destRect, scaledSrcRect, compositeOp, blendMode, orientation);
</del><ins>+ ctxt.drawNativeImage(image, imageSize, destRect, scaledSrcRect, compositeOp, blendMode, orientation);
</ins><span class="cx">
</span><span class="cx"> if (imageObserver())
</span><span class="cx"> imageObserver()->didDraw(this);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassNativeImagePtr BitmapImage::copyUnscaledFrameAtIndex(size_t index)
</del><ins>+RetainPtr<CGImageRef> BitmapImage::copyUnscaledFrameImageAtIndex(size_t index)
</ins><span class="cx"> {
</span><span class="cx"> if (index >= frameCount())
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- if (index >= m_frames.size() || !m_frames[index].m_frame)
</del><ins>+ if (index >= m_frames.size() || !m_frames[index].m_image)
</ins><span class="cx"> cacheFrame(index, 0);
</span><span class="cx">
</span><span class="cx"> if (!m_frames[index].m_subsamplingLevel)
</span><del>- return CGImageRetain(m_frames[index].m_frame);
</del><ins>+ return m_frames[index].m_image;
</ins><span class="cx">
</span><del>- return m_source.createFrameAtIndex(index);
</del><ins>+ return m_source.createFrameImageAtIndex(index);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgGraphicsContext3DCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -333,15 +333,15 @@
</span><span class="cx"> if (!decoder.frameCount())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- m_decodedImage = adoptCF(decoder.createFrameAtIndex(0));
- m_cgImage = m_decodedImage.get();
</del><ins>+ m_decodedImage = decoder.createFrameImageAtIndex(0);
+ m_cgImage = m_decodedImage;
</ins><span class="cx"> } else
</span><span class="cx"> m_cgImage = m_image->nativeImageForCurrentFrame();
</span><span class="cx"> if (!m_cgImage)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- m_imageWidth = CGImageGetWidth(m_cgImage);
- m_imageHeight = CGImageGetHeight(m_cgImage);
</del><ins>+ m_imageWidth = CGImageGetWidth(m_cgImage.get());
+ m_imageHeight = CGImageGetHeight(m_cgImage.get());
</ins><span class="cx"> if (!m_imageWidth || !m_imageHeight)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -349,7 +349,7 @@
</span><span class="cx"> // so, re-render it into an RGB color space. The image re-packing
</span><span class="cx"> // code requires color data, not color table indices, for the
</span><span class="cx"> // image data.
</span><del>- CGColorSpaceRef colorSpace = CGImageGetColorSpace(m_cgImage);
</del><ins>+ CGColorSpaceRef colorSpace = CGImageGetColorSpace(m_cgImage.get());
</ins><span class="cx"> CGColorSpaceModel model = CGColorSpaceGetModel(colorSpace);
</span><span class="cx"> if (model == kCGColorSpaceModelIndexed) {
</span><span class="cx"> RetainPtr<CGContextRef> bitmapContext;
</span><span class="lines">@@ -364,22 +364,22 @@
</span><span class="cx">
</span><span class="cx"> CGContextSetBlendMode(bitmapContext.get(), kCGBlendModeCopy);
</span><span class="cx"> CGContextSetInterpolationQuality(bitmapContext.get(), kCGInterpolationNone);
</span><del>- CGContextDrawImage(bitmapContext.get(), CGRectMake(0, 0, m_imageWidth, m_imageHeight), m_cgImage);
</del><ins>+ CGContextDrawImage(bitmapContext.get(), CGRectMake(0, 0, m_imageWidth, m_imageHeight), m_cgImage.get());
</ins><span class="cx">
</span><span class="cx"> // Now discard the original CG image and replace it with a copy from the bitmap context.
</span><span class="cx"> m_decodedImage = adoptCF(CGBitmapContextCreateImage(bitmapContext.get()));
</span><span class="cx"> m_cgImage = m_decodedImage.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- size_t bitsPerComponent = CGImageGetBitsPerComponent(m_cgImage);
- size_t bitsPerPixel = CGImageGetBitsPerPixel(m_cgImage);
</del><ins>+ size_t bitsPerComponent = CGImageGetBitsPerComponent(m_cgImage.get());
+ size_t bitsPerPixel = CGImageGetBitsPerPixel(m_cgImage.get());
</ins><span class="cx"> if (bitsPerComponent != 8 && bitsPerComponent != 16)
</span><span class="cx"> return false;
</span><span class="cx"> if (bitsPerPixel % bitsPerComponent)
</span><span class="cx"> return false;
</span><span class="cx"> size_t componentsPerPixel = bitsPerPixel / bitsPerComponent;
</span><span class="cx">
</span><del>- CGBitmapInfo bitInfo = CGImageGetBitmapInfo(m_cgImage);
</del><ins>+ CGBitmapInfo bitInfo = CGImageGetBitmapInfo(m_cgImage.get());
</ins><span class="cx"> bool bigEndianSource = false;
</span><span class="cx"> // These could technically be combined into one large switch
</span><span class="cx"> // statement, but we prefer not to so that we fail fast if we
</span><span class="lines">@@ -421,7 +421,7 @@
</span><span class="cx">
</span><span class="cx"> m_alphaOp = AlphaDoNothing;
</span><span class="cx"> AlphaFormat alphaFormat = AlphaFormatNone;
</span><del>- switch (CGImageGetAlphaInfo(m_cgImage)) {
</del><ins>+ switch (CGImageGetAlphaInfo(m_cgImage.get())) {
</ins><span class="cx"> case kCGImageAlphaPremultipliedFirst:
</span><span class="cx"> if (!premultiplyAlpha)
</span><span class="cx"> m_alphaOp = AlphaDoUnmultiply;
</span><span class="lines">@@ -461,14 +461,14 @@
</span><span class="cx"> if (m_imageSourceFormat == DataFormatNumFormats)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- m_pixelData = adoptCF(CGDataProviderCopyData(CGImageGetDataProvider(m_cgImage)));
</del><ins>+ m_pixelData = adoptCF(CGDataProviderCopyData(CGImageGetDataProvider(m_cgImage.get())));
</ins><span class="cx"> if (!m_pixelData)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> m_imagePixelData = reinterpret_cast<const void*>(CFDataGetBytePtr(m_pixelData.get()));
</span><span class="cx">
</span><span class="cx"> unsigned int srcUnpackAlignment = 0;
</span><del>- size_t bytesPerRow = CGImageGetBytesPerRow(m_cgImage);
</del><ins>+ size_t bytesPerRow = CGImageGetBytesPerRow(m_cgImage.get());
</ins><span class="cx"> unsigned padding = bytesPerRow - bitsPerPixel / 8 * m_imageWidth;
</span><span class="cx"> if (padding) {
</span><span class="cx"> srcUnpackAlignment = padding + 1;
</span><span class="lines">@@ -536,7 +536,7 @@
</span><span class="cx"> context.scale(FloatSize(1, -1));
</span><span class="cx"> context.translate(0, -imageHeight);
</span><span class="cx"> context.setImageInterpolationQuality(InterpolationNone);
</span><del>- context.drawNativeImage(cgImage.get(), imageSize, canvasRect, FloatRect(FloatPoint(), imageSize), CompositeCopy);
</del><ins>+ context.drawNativeImage(cgImage, imageSize, canvasRect, FloatRect(FloatPoint(), imageSize), CompositeCopy);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgGraphicsContextCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -162,19 +162,19 @@
</span><span class="cx"> m_data->m_userToDeviceTransformKnownToBeIdentity = false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::drawNativeImage(PassNativeImagePtr imagePtr, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, ImageOrientation orientation)
</del><ins>+void GraphicsContext::drawNativeImage(const RetainPtr<CGImageRef>& image, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, ImageOrientation orientation)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (isRecording()) {
</span><del>- m_displayListRecorder->drawNativeImage(imagePtr, imageSize, destRect, srcRect, op, blendMode, orientation);
</del><ins>+ m_displayListRecorder->drawNativeImage(image, imageSize, destRect, srcRect, op, blendMode, orientation);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RetainPtr<CGImageRef> image(imagePtr);
</del><ins>+ RetainPtr<CGImageRef> subImage(image);
</ins><span class="cx">
</span><del>- float currHeight = orientation.usesWidthAsHeight() ? CGImageGetWidth(image.get()) : CGImageGetHeight(image.get());
</del><ins>+ float currHeight = orientation.usesWidthAsHeight() ? CGImageGetWidth(subImage.get()) : CGImageGetHeight(subImage.get());
</ins><span class="cx"> if (currHeight <= srcRect.y())
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -216,13 +216,13 @@
</span><span class="cx"> adjustedDestRect.setHeight(subimageRect.height() / yScale);
</span><span class="cx">
</span><span class="cx"> #if CACHE_SUBIMAGES
</span><del>- image = subimageCache().getSubimage(image.get(), subimageRect);
</del><ins>+ subImage = subimageCache().getSubimage(subImage.get(), subimageRect);
</ins><span class="cx"> #else
</span><del>- image = adoptCF(CGImageCreateWithImageInRect(image.get(), subimageRect));
</del><ins>+ subImage = adoptCF(CGImageCreateWithImageInRect(subImage.get(), subimageRect));
</ins><span class="cx"> #endif
</span><span class="cx"> if (currHeight < srcRect.maxY()) {
</span><del>- ASSERT(CGImageGetHeight(image.get()) == currHeight - CGRectIntegral(srcRect).origin.y);
- adjustedDestRect.setHeight(CGImageGetHeight(image.get()) / yScale);
</del><ins>+ ASSERT(CGImageGetHeight(subImage.get()) == currHeight - CGRectIntegral(srcRect).origin.y);
+ adjustedDestRect.setHeight(CGImageGetHeight(subImage.get()) / yScale);
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> adjustedDestRect.setLocation(FloatPoint(destRect.x() - srcRect.x() / xScale, destRect.y() - srcRect.y() / yScale));
</span><span class="lines">@@ -262,7 +262,7 @@
</span><span class="cx"> CGContextScaleCTM(context, 1, -1);
</span><span class="cx">
</span><span class="cx"> // Draw the image.
</span><del>- CGContextDrawImage(context, adjustedDestRect, image.get());
</del><ins>+ CGContextDrawImage(context, adjustedDestRect, subImage.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void drawPatternCallback(void* info, CGContextRef context)
</span><span class="lines">@@ -311,8 +311,8 @@
</span><span class="cx"> float adjustedX = phase.x() - destRect.x() + tileRect.x() * narrowPrecisionToFloat(patternTransform.a()); // We translated the context so that destRect.x() is the origin, so subtract it out.
</span><span class="cx"> float adjustedY = destRect.height() - (phase.y() - destRect.y() + tileRect.y() * narrowPrecisionToFloat(patternTransform.d()) + scaledTileHeight);
</span><span class="cx">
</span><del>- CGImageRef tileImage = image.nativeImageForCurrentFrame();
- float h = CGImageGetHeight(tileImage);
</del><ins>+ auto tileImage = image.nativeImageForCurrentFrame();
+ float h = CGImageGetHeight(tileImage.get());
</ins><span class="cx">
</span><span class="cx"> RetainPtr<CGImageRef> subImage;
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -326,13 +326,13 @@
</span><span class="cx"> // Copying a sub-image out of a partially-decoded image stops the decoding of the original image. It should never happen
</span><span class="cx"> // because sub-images are only used for border-image, which only renders when the image is fully decoded.
</span><span class="cx"> ASSERT(h == image.height());
</span><del>- subImage = adoptCF(CGImageCreateWithImageInRect(tileImage, tileRect));
</del><ins>+ subImage = adoptCF(CGImageCreateWithImageInRect(tileImage.get(), tileRect));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // If we need to paint gaps between tiles because we have a partially loaded image or non-zero spacing,
</span><span class="cx"> // fall back to the less efficient CGPattern-based mechanism.
</span><span class="cx"> float scaledTileWidth = tileRect.width() * narrowPrecisionToFloat(patternTransform.a());
</span><del>- float w = CGImageGetWidth(tileImage);
</del><ins>+ float w = CGImageGetWidth(tileImage.get());
</ins><span class="cx"> if (w == image.size().width() && h == image.size().height() && !spacing.width() && !spacing.height()) {
</span><span class="cx"> // FIXME: CG seems to snap the images to integral sizes. When we care (e.g. with border-image-repeat: round),
</span><span class="cx"> // we should tile all but the last, and stetch the last image to fit.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgImageBufferCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx"> if (!image)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return BitmapImage::create(image.get());
</del><ins>+ return BitmapImage::create(WTFMove(image));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<Image> ImageBuffer::copyImage(BackingStoreCopy copyBehavior, ScaleBehavior scaleBehavior) const
</span><span class="lines">@@ -319,7 +319,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Uint8ClampedArray> ImageBuffer::getUnmultipliedImageData(const IntRect& rect, CoordinateSystem coordinateSystem) const
</del><ins>+RefPtr<Uint8ClampedArray> ImageBuffer::getUnmultipliedImageData(const IntRect& rect, CoordinateSystem coordinateSystem) const
</ins><span class="cx"> {
</span><span class="cx"> if (context().isAcceleratedContext())
</span><span class="cx"> flushContext();
</span><span class="lines">@@ -331,7 +331,7 @@
</span><span class="cx"> return m_data.getData(srcRect, internalSize(), context().isAcceleratedContext(), true, 1);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Uint8ClampedArray> ImageBuffer::getPremultipliedImageData(const IntRect& rect, CoordinateSystem coordinateSystem) const
</del><ins>+RefPtr<Uint8ClampedArray> ImageBuffer::getPremultipliedImageData(const IntRect& rect, CoordinateSystem coordinateSystem) const
</ins><span class="cx"> {
</span><span class="cx"> if (context().isAcceleratedContext())
</span><span class="cx"> flushContext();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgImageSourceCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -340,7 +340,7 @@
</span><span class="cx"> return m_decoder ? CGImageSourceGetCount(m_decoder) : 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CGImageRef ImageSource::createFrameAtIndex(size_t index, SubsamplingLevel subsamplingLevel)
</del><ins>+RetainPtr<CGImageRef> ImageSource::createFrameImageAtIndex(size_t index, SubsamplingLevel subsamplingLevel)
</ins><span class="cx"> {
</span><span class="cx"> if (!initialized())
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -366,18 +366,15 @@
</span><span class="cx"> static const CFStringRef xbmUTI = CFSTR("public.xbitmap-image");
</span><span class="cx">
</span><span class="cx"> if (!imageUTI)
</span><del>- return image.leakRef();
</del><ins>+ return image;
</ins><span class="cx">
</span><span class="cx"> if (!CFEqual(imageUTI, xbmUTI))
</span><del>- return image.leakRef();
</del><ins>+ return image;
</ins><span class="cx">
</span><span class="cx"> // If it is an xbm image, mask out all the white areas to render them transparent.
</span><span class="cx"> const CGFloat maskingColors[6] = {255, 255, 255, 255, 255, 255};
</span><span class="cx"> RetainPtr<CGImageRef> maskedImage = adoptCF(CGImageCreateWithMaskingColors(image.get(), maskingColors));
</span><del>- if (!maskedImage)
- return image.leakRef();
-
- return maskedImage.leakRef();
</del><ins>+ return maskedImage ? maskedImage : image;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool ImageSource::frameIsCompleteAtIndex(size_t index)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListItemscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -491,11 +491,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if USE(CG) || USE(CAIRO)
</span><del>-DrawNativeImage::DrawNativeImage(PassNativeImagePtr imagePtr, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, ImageOrientation orientation)
</del><ins>+DrawNativeImage::DrawNativeImage(const NativeImagePtr& image, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, ImageOrientation orientation)
</ins><span class="cx"> : DrawingItem(ItemType::DrawNativeImage)
</span><span class="cx"> #if USE(CG)
</span><span class="cx"> // FIXME: Need to store an image for Cairo.
</span><del>- , m_imagePtr(imagePtr)
</del><ins>+ , m_image(image)
</ins><span class="cx"> #endif
</span><span class="cx"> , m_imageSize(imageSize)
</span><span class="cx"> , m_destination(destRect)
</span><span class="lines">@@ -507,7 +507,7 @@
</span><span class="cx"> , m_orientation(orientation)
</span><span class="cx"> {
</span><span class="cx"> #if !USE(CG)
</span><del>- UNUSED_PARAM(imagePtr);
</del><ins>+ UNUSED_PARAM(image);
</ins><span class="cx"> UNUSED_PARAM(op);
</span><span class="cx"> UNUSED_PARAM(blendMode);
</span><span class="cx"> #endif
</span><span class="lines">@@ -516,7 +516,7 @@
</span><span class="cx"> void DrawNativeImage::apply(GraphicsContext& context) const
</span><span class="cx"> {
</span><span class="cx"> #if USE(CG)
</span><del>- context.drawNativeImage(m_imagePtr.get(), m_imageSize, m_destination, m_srcRect, m_op, m_blendMode, m_orientation);
</del><ins>+ context.drawNativeImage(m_image, m_imageSize, m_destination, m_srcRect, m_op, m_blendMode, m_orientation);
</ins><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(context);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListItemsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -639,23 +639,23 @@
</span><span class="cx"> #if USE(CG) || USE(CAIRO)
</span><span class="cx"> class DrawNativeImage : public DrawingItem {
</span><span class="cx"> public:
</span><del>- static Ref<DrawNativeImage> create(PassNativeImagePtr imagePtr, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, ImageOrientation orientation)
</del><ins>+ static Ref<DrawNativeImage> create(const NativeImagePtr& image, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, ImageOrientation orientation)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new DrawNativeImage(imagePtr, imageSize, destRect, srcRect, op, blendMode, orientation));
</del><ins>+ return adoptRef(*new DrawNativeImage(image, imageSize, destRect, srcRect, op, blendMode, orientation));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> FloatRect source() const { return m_srcRect; }
</span><span class="cx"> FloatRect destination() const { return m_destination; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- DrawNativeImage(PassNativeImagePtr, const FloatSize& selfSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientation);
</del><ins>+ DrawNativeImage(const NativeImagePtr&, const FloatSize& selfSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientation);
</ins><span class="cx">
</span><span class="cx"> void apply(GraphicsContext&) const override;
</span><span class="cx">
</span><span class="cx"> Optional<FloatRect> localBounds(const GraphicsContext&) const override { return m_destination; }
</span><span class="cx">
</span><span class="cx"> #if USE(CG)
</span><del>- RetainPtr<CGImageRef> m_imagePtr;
</del><ins>+ RetainPtr<CGImageRef> m_image;
</ins><span class="cx"> #endif
</span><span class="cx"> FloatSize m_imageSize;
</span><span class="cx"> FloatRect m_destination;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecordercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -119,9 +119,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if USE(CG) || USE(CAIRO)
</span><del>-void Recorder::drawNativeImage(PassNativeImagePtr imagePtr, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, ImageOrientation orientation)
</del><ins>+void Recorder::drawNativeImage(const NativeImagePtr& image, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator op, BlendMode blendMode, ImageOrientation orientation)
</ins><span class="cx"> {
</span><del>- DrawingItem& newItem = downcast<DrawingItem>(appendItem(DrawNativeImage::create(imagePtr, imageSize, destRect, srcRect, op, blendMode, orientation)));
</del><ins>+ DrawingItem& newItem = downcast<DrawingItem>(appendItem(DrawNativeImage::create(image, imageSize, destRect, srcRect, op, blendMode, orientation)));
</ins><span class="cx"> updateItemExtent(newItem);
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecorderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> void drawTiledImage(Image&, const FloatRect& destination, const FloatPoint& source, const FloatSize& tileSize, const FloatSize& spacing, const ImagePaintingOptions&);
</span><span class="cx"> void drawTiledImage(Image&, const FloatRect& destination, const FloatRect& source, const FloatSize& tileScaleFactor, Image::TileRule hRule, Image::TileRule vRule, const ImagePaintingOptions&);
</span><span class="cx"> #if USE(CG) || USE(CAIRO)
</span><del>- void drawNativeImage(PassNativeImagePtr, const FloatSize& selfSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientation);
</del><ins>+ void drawNativeImage(const NativeImagePtr&, const FloatSize& selfSize, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator, BlendMode, ImageOrientation);
</ins><span class="cx"> #endif
</span><span class="cx"> void drawPattern(Image&, const FloatRect& srcRect, const AffineTransform&, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator, const FloatRect& destRect, BlendMode = BlendModeNormal);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicseflGraphicsContext3DEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -263,7 +263,7 @@
</span><span class="cx"> if (!decoder.frameCount() || !decoder.frameIsCompleteAtIndex(0))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- m_imageSurface = decoder.createFrameAtIndex(0);
</del><ins>+ m_imageSurface = decoder.createFrameImageAtIndex(0);
</ins><span class="cx"> } else {
</span><span class="cx"> m_imageSurface = m_image->nativeImageForCurrentFrame();
</span><span class="cx"> // 1. For texImage2D with HTMLVideoElment input, assume no PremultiplyAlpha had been applied and the alpha value is 0xFF for each pixel,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicseflIconEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/efl/IconEfl.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/efl/IconEfl.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/efl/IconEfl.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> #include "GraphicsContext.h"
</span><span class="cx"> #include "MIMETypeRegistry.h"
</span><span class="cx"> #include "NotImplemented.h"
</span><del>-#include <wtf/PassRefPtr.h>
</del><ins>+#include <wtf/RefPtr.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -51,10 +51,10 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>&)
</del><ins>+RefPtr<Icon> Icon::createIconForFiles(const Vector<String>&)
</ins><span class="cx"> {
</span><span class="cx"> notImplemented();
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Icon::paint(GraphicsContext&, const FloatRect&)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerImageGStreamerCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create_for_data(bufferData, cairoFormat, width, height, stride));
</span><span class="cx"> ASSERT(cairo_surface_status(surface.get()) == CAIRO_STATUS_SUCCESS);
</span><del>- m_image = BitmapImage::create(surface.release());
</del><ins>+ m_image = BitmapImage::create(WTFMove(surface));
</ins><span class="cx">
</span><span class="cx"> if (GstVideoCropMeta* cropMeta = gst_buffer_get_video_crop_meta(buffer))
</span><span class="cx"> setCropRect(FloatRect(cropMeta->x, cropMeta->y, cropMeta->width, cropMeta->height));
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgtkIconGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gtk/IconGtk.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gtk/IconGtk.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/gtk/IconGtk.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">
</span><span class="cx"> #include <gtk/gtk.h>
</span><span class="cx">
</span><del>-#include <wtf/PassRefPtr.h>
</del><ins>+#include <wtf/RefPtr.h>
</ins><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME: Move the code to ChromeClient::iconForFiles().
</span><del>-PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
</del><ins>+RefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
</ins><span class="cx"> {
</span><span class="cx"> if (filenames.isEmpty())
</span><span class="cx"> return 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsiosIconIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ios/IconIOS.mm (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ios/IconIOS.mm        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/ios/IconIOS.mm        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-Icon::Icon(CGImageRef image)
</del><ins>+Icon::Icon(const NativeImagePtr& image)
</ins><span class="cx"> : m_cgImage(image)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -42,17 +42,17 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& /*filenames*/)
</del><ins>+RefPtr<Icon> Icon::createIconForFiles(const Vector<String>& /*filenames*/)
</ins><span class="cx"> {
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Icon> Icon::createIconForImage(NativeImagePtr imageRef)
</del><ins>+RefPtr<Icon> Icon::createIconForImage(const RetainPtr<CGImageRef>& image)
</ins><span class="cx"> {
</span><del>- if (!imageRef)
</del><ins>+ if (!image)
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return adoptRef(new Icon(imageRef));
</del><ins>+ return adoptRef(new Icon(image));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Icon::paint(GraphicsContext& context, const FloatRect& destRect)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacIconMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/IconMac.mm (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/IconMac.mm        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/mac/IconMac.mm        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #import "IntRect.h"
</span><span class="cx"> #import "LocalCurrentGraphicsContext.h"
</span><span class="cx"> #import "UTIUtilities.h"
</span><del>-#import <wtf/PassRefPtr.h>
</del><ins>+#import <wtf/RefPtr.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME: Move the code to ChromeClient::iconForFiles().
</span><del>-PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
</del><ins>+RefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
</ins><span class="cx"> {
</span><span class="cx"> if (filenames.isEmpty())
</span><span class="cx"> return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacImageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/ImageMac.mm (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/ImageMac.mm        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/mac/ImageMac.mm        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">
</span><span class="cx"> Vector<CGImageRef> images;
</span><span class="cx"> for (unsigned i = 0; i < numFrames; ++i ) {
</span><del>- CGImageRef cgImage = frameAtIndex(i);
</del><ins>+ CGImageRef cgImage = frameImageAtIndex(i).get();
</ins><span class="cx"> if (cgImage)
</span><span class="cx"> images.append(cgImage);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedSurfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedSurface.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedSurface.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedSurface.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> s_factory = factory;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<CoordinatedSurface> CoordinatedSurface::create(const IntSize& size, Flags flags)
</del><ins>+RefPtr<CoordinatedSurface> CoordinatedSurface::create(const IntSize& size, Flags flags)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(s_factory);
</span><span class="cx"> return s_factory(size, flags);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedSurfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedSurface.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedSurface.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedSurface.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx">
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="cx"> #include "IntRect.h"
</span><del>-#include <wtf/PassRefPtr.h>
</del><ins>+#include <wtf/RefPtr.h>
</ins><span class="cx"> #include <wtf/ThreadSafeRefCounted.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -44,9 +44,9 @@
</span><span class="cx"> virtual void paintToSurfaceContext(GraphicsContext&) = 0;
</span><span class="cx"> };
</span><span class="cx">
</span><del>- typedef PassRefPtr<CoordinatedSurface> Factory(const IntSize&, Flags);
</del><ins>+ typedef RefPtr<CoordinatedSurface> Factory(const IntSize&, Flags);
</ins><span class="cx"> static void setFactory(Factory);
</span><del>- static PassRefPtr<CoordinatedSurface> create(const IntSize&, Flags);
</del><ins>+ static RefPtr<CoordinatedSurface> create(const IntSize&, Flags);
</ins><span class="cx">
</span><span class="cx"> virtual ~CoordinatedSurface() { }
</span><span class="cx">
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> virtual void paintToSurface(const IntRect&, Client*) = 0;
</span><span class="cx">
</span><span class="cx"> #if USE(TEXTURE_MAPPER)
</span><del>- virtual void copyToTexture(PassRefPtr<BitmapTexture>, const IntRect& target, const IntPoint& sourceOffset) = 0;
</del><ins>+ virtual void copyToTexture(RefPtr<BitmapTexture>, const IntRect& target, const IntPoint& sourceOffset) = 0;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> protected:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinIconWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/IconWin.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/IconWin.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/win/IconWin.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME: Move the code to ChromeClient::iconForFiles().
</span><del>-PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
</del><ins>+RefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames)
</ins><span class="cx"> {
</span><span class="cx"> if (filenames.isEmpty())
</span><span class="cx"> return 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinImageCGWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/ImageCGWin.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/ImageCGWin.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/win/ImageCGWin.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-PassRefPtr<BitmapImage> BitmapImage::create(HBITMAP hBitmap)
</del><ins>+RefPtr<BitmapImage> BitmapImage::create(HBITMAP hBitmap)
</ins><span class="cx"> {
</span><span class="cx"> DIBSECTION dibSection;
</span><span class="cx"> if (!GetObject(hBitmap, sizeof(DIBSECTION), &dibSection))
</span><span class="lines">@@ -54,9 +54,9 @@
</span><span class="cx"> dibSection.dsBm.bmWidthBytes, deviceRGBColorSpaceRef(), kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst));
</span><span class="cx">
</span><span class="cx"> // The BitmapImage takes ownership of this.
</span><del>- CGImageRef cgImage = CGBitmapContextCreateImage(bitmapContext.get());
</del><ins>+ RetainPtr<CGImageRef> cgImage = adoptCF(CGBitmapContextCreateImage(bitmapContext.get()));
</ins><span class="cx">
</span><del>- return adoptRef(new BitmapImage(cgImage));
</del><ins>+ return adoptRef(new BitmapImage(WTFMove(cgImage)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool BitmapImage::getHBITMAPOfSize(HBITMAP bmp, const IntSize* size)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> {
</span><span class="cx"> size_t frames = frameCount();
</span><span class="cx"> for (size_t i = 0; i < frames; ++i) {
</span><del>- CGImageRef image = frameAtIndex(i);
</del><ins>+ CGImageRef image = frameImageAtIndex(i).get();
</ins><span class="cx"> if (image && CGImageGetHeight(image) == static_cast<size_t>(srcSize.height()) && CGImageGetWidth(image) == static_cast<size_t>(srcSize.width())) {
</span><span class="cx"> size_t currentFrame = m_currentFrame;
</span><span class="cx"> m_currentFrame = i;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinImageCairoWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/ImageCairoWin.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/ImageCairoWin.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/graphics/win/ImageCairoWin.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-PassRefPtr<BitmapImage> BitmapImage::create(HBITMAP hBitmap)
</del><ins>+RefPtr<BitmapImage> BitmapImage::create(HBITMAP hBitmap)
</ins><span class="cx"> {
</span><span class="cx"> DIBSECTION dibSection;
</span><span class="cx"> if (!GetObject(hBitmap, sizeof(DIBSECTION), &dibSection))
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<cairo_surface_t> surface = adoptRef(cairo_win32_surface_create_with_dib(CAIRO_FORMAT_ARGB32, dibSection.dsBm.bmWidth, dibSection.dsBm.bmHeight));
</span><span class="cx">
</span><del>- return BitmapImage::create(surface.release());
</del><ins>+ return BitmapImage::create(WTFMove(surface));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool BitmapImage::getHBITMAPOfSize(HBITMAP bmp, const IntSize* size)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> {
</span><span class="cx"> size_t frames = frameCount();
</span><span class="cx"> for (size_t i = 0; i < frames; ++i) {
</span><del>- RefPtr<cairo_surface_t> surface = frameAtIndex(i);
</del><ins>+ auto surface = frameImageAtIndex(i);
</ins><span class="cx"> if (!surface)
</span><span class="cx"> continue;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformimagedecodersImageDecoderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/image-decoders/ImageDecoder.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/image-decoders/ImageDecoder.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/image-decoders/ImageDecoder.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> // Returns a caller-owned pointer to the underlying native image data.
</span><span class="cx"> // (Actual use: This pointer will be owned by BitmapImage and freed in
</span><span class="cx"> // FrameData::clear()).
</span><del>- PassNativeImagePtr asNewNativeImage() const;
</del><ins>+ NativeImagePtr asNewNativeImage() const;
</ins><span class="cx">
</span><span class="cx"> bool hasAlpha() const;
</span><span class="cx"> const IntRect& originalFrameRect() const { return m_originalFrameRect; }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformimagedecoderscairoImageDecoderCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/image-decoders/cairo/ImageDecoderCairo.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/image-decoders/cairo/ImageDecoderCairo.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/image-decoders/cairo/ImageDecoderCairo.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-PassNativeImagePtr ImageFrame::asNewNativeImage() const
</del><ins>+NativeImagePtr ImageFrame::asNewNativeImage() const
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(cairo_image_surface_create_for_data(
</span><span class="cx"> reinterpret_cast<unsigned char*>(const_cast<PixelData*>(m_bytes)),
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformwinDragImageCGWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/win/DragImageCGWin.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/win/DragImageCGWin.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/platform/win/DragImageCGWin.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -128,7 +128,6 @@
</span><span class="cx"> if (!hbmp || !drawContext)
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- CGImageRef srcImage = img->getCGImageRef();
</del><span class="cx"> CGRect rect;
</span><span class="cx"> rect.size = IntSize(img->size());
</span><span class="cx"> rect.origin.x = 0;
</span><span class="lines">@@ -137,7 +136,7 @@
</span><span class="cx"> CGContextScaleCTM(drawContext, 1, -1);
</span><span class="cx"> CGContextSetFillColor(drawContext, white);
</span><span class="cx"> CGContextFillRect(drawContext, rect);
</span><del>- if (srcImage) {
</del><ins>+ if (auto srcImage = img->getCGImageRef()) {
</ins><span class="cx"> CGContextSetBlendMode(drawContext, kCGBlendModeNormal);
</span><span class="cx"> CGContextDrawImage(drawContext, rect, srcImage);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -180,17 +180,17 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if USE(CAIRO)
</span><del>-// Passes ownership of the native image to the caller so PassNativeImagePtr needs
</del><ins>+// Passes ownership of the native image to the caller so NativeImagePtr needs
</ins><span class="cx"> // to be a smart pointer type.
</span><del>-PassNativeImagePtr SVGImage::nativeImageForCurrentFrame()
</del><ins>+NativeImagePtr SVGImage::nativeImageForCurrentFrame()
</ins><span class="cx"> {
</span><span class="cx"> if (!m_page)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> // Cairo does not use the accelerated drawing flag, so it's OK to make an unconditionally unaccelerated buffer.
</span><span class="cx"> std::unique_ptr<ImageBuffer> buffer = ImageBuffer::create(size(), Unaccelerated);
</span><span class="cx"> if (!buffer) // failed to allocate image
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> draw(buffer->context(), rect(), rect(), CompositeSourceOver, BlendModeNormal, ImageOrientationDescription());
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImage.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImage.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> void resetAnimation() override;
</span><span class="cx">
</span><span class="cx"> #if USE(CAIRO)
</span><del>- PassNativeImagePtr nativeImageForCurrentFrame() override;
</del><ins>+ NativeImagePtr nativeImageForCurrentFrame() override;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImageForContainercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> m_image->drawPatternForContainer(context, m_containerSize, m_zoom, srcRect, patternTransform, phase, spacing, compositeOp, dstRect, blendMode);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassNativeImagePtr SVGImageForContainer::nativeImageForCurrentFrame()
</del><ins>+NativeImagePtr SVGImageForContainer::nativeImageForCurrentFrame()
</ins><span class="cx"> {
</span><span class="cx"> return m_image->nativeImageForCurrentFrame();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImageForContainerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImageForContainer.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImageForContainer.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebCore/svg/graphics/SVGImageForContainer.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> // FIXME: Implement this to be less conservative.
</span><span class="cx"> bool currentFrameKnownToBeOpaque() override { return false; }
</span><span class="cx">
</span><del>- PassNativeImagePtr nativeImageForCurrentFrame() override;
</del><ins>+ NativeImagePtr nativeImageForCurrentFrame() override;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> SVGImageForContainer(SVGImage* image, const FloatSize& containerSize, float zoom)
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-03-24 Said Abou-Hallawa <sabouhallawa@apple,com>
+
+ Change NativeImagePtr for CG to be RetainPtr<CGImageRef>
+ https://bugs.webkit.org/show_bug.cgi?id=155412
+
+ Reviewed by Darin Adler.
+
+ * Misc/WebCache.mm:
+ (+[WebCache addImageToCache:forURL:forFrame:]):
+ WebCore::MemoryCache() is taking an rvalue NativeImagePtr. We need to create
+ NativeImagePtr from the image raw pointer when calling this function.
+
</ins><span class="cx"> 2016-03-24 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Fix some new PDFKit-related warnings
</span></span></pre></div>
<a id="trunkSourceWebKitmacMiscWebCachemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Misc/WebCache.mm (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Misc/WebCache.mm        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit/mac/Misc/WebCache.mm        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx"> if (frame)
</span><span class="cx"> topOrigin = core(frame)->document()->topOrigin();
</span><span class="cx"> #endif
</span><del>- return WebCore::MemoryCache::singleton().addImageToCache(image, url, topOrigin ? topOrigin->domainForCachePartition() : emptyString());
</del><ins>+ return WebCore::MemoryCache::singleton().addImageToCache(RetainPtr<CGImageRef>(image), url, topOrigin ? topOrigin->domainForCachePartition() : emptyString());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> + (void)removeImageFromCacheForURL:(NSURL *)url
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit/win/ChangeLog        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-03-24 Said Abou-Hallawa <sabouhallawa@apple,com>
+
+ Change NativeImagePtr for CG to be RetainPtr<CGImageRef>
+ https://bugs.webkit.org/show_bug.cgi?id=155412
+
+ Reviewed by Darin Adler.
+
+ * Plugins/PluginView.h:
+ * Plugins/PluginViewWin.cpp:
+ (WebCore::PluginView::snapshot):
+ Replace PassRefPtr with RefPtr.
+
</ins><span class="cx"> 2016-03-22 Per Arne Vollan <peavo@outlook.com>
</span><span class="cx">
</span><span class="cx"> [Win] [64-bit] Remove MSVC 2013 FMA3 Bug Workaround
</span></span></pre></div>
<a id="trunkSourceWebKitwinPluginsPluginViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Plugins/PluginView.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Plugins/PluginView.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit/win/Plugins/PluginView.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #include "Timer.h"
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="lines">@@ -292,7 +291,7 @@
</span><span class="cx"> void handleMouseEvent(MouseEvent*);
</span><span class="cx">
</span><span class="cx"> void paintIntoTransformedContext(HDC);
</span><del>- PassRefPtr<Image> snapshot();
</del><ins>+ RefPtr<Image> snapshot();
</ins><span class="cx">
</span><span class="cx"> float deviceScaleFactor() const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitwinPluginsPluginViewWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Plugins/PluginViewWin.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Plugins/PluginViewWin.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit/win/Plugins/PluginViewWin.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -920,7 +920,7 @@
</span><span class="cx"> setPlatformPluginWidget(0);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Image> PluginView::snapshot()
</del><ins>+RefPtr<Image> PluginView::snapshot()
</ins><span class="cx"> {
</span><span class="cx"> #if !USE(WINGDI)
</span><span class="cx"> auto hdc = adoptGDIObject(::CreateCompatibleDC(0));
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit2/ChangeLog        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2016-03-24 Said Abou-Hallawa <sabouhallawa@apple,com>
+
+ Change NativeImagePtr for CG to be RetainPtr<CGImageRef>
+ https://bugs.webkit.org/show_bug.cgi?id=155412
+
+ Reviewed by Darin Adler.
+
+ * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
+ (WebKit::WebCoordinatedSurface::createWithSurface):
+ (WebKit::WebCoordinatedSurface::create):
+ (WebKit::WebCoordinatedSurface::WebCoordinatedSurface):
+ (WebKit::WebCoordinatedSurface::copyToTexture):
+ * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
+ * Shared/ShareableBitmap.cpp:
+ (WebKit::ShareableBitmap::create):
+ (WebKit::ShareableBitmap::createShareable):
+ (WebKit::ShareableBitmap::ShareableBitmap):
+ * Shared/ShareableBitmap.h:
+ Replace PassRefPtr with RefPtr and use WTFMove() instead of RefPtr::release()
+ when passing the RefPtr.
+
+ * Shared/cairo/ShareableBitmapCairo.cpp:
+ (WebKit::createSurfaceFromData):
+ (WebKit::ShareableBitmap::createCairoSurface):
+ Replace PassRefPtr with RefPtr.
+
+ (WebKit::ShareableBitmap::createImage):
+ * Shared/cg/ShareableBitmapCG.cpp:
+ (WebKit::ShareableBitmap::createImage):
+ Replace PassRefPtr with RefPtr and use the move semantics when calling
+ BitmapImage::create().
+
+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
+ (WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
+ * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
+ (WebKit::ThreadedCoordinatedLayerTreeHost::createCoordinatedSurface):
+ * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
+ Replace PassRefPtr with RefPtr
+
</ins><span class="cx"> 2016-03-24 Enrica Casucci <enrica@apple.com>
</span><span class="cx">
</span><span class="cx"> Adopt new SPI from DataDetectorsCore to decide link behavior.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedCoordinatedGraphicsWebCoordinatedSurfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -99,8 +99,7 @@
</span><span class="cx"> if (!surface)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- ASSERT(surface);
- return adoptRef(new WebCoordinatedSurface(size, flags, surface.release()));
</del><ins>+ return adoptRef(new WebCoordinatedSurface(size, flags, WTFMove(surface)));
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -118,25 +117,25 @@
</span><span class="cx"> return graphicsContext;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Ref<WebCoordinatedSurface> WebCoordinatedSurface::create(const IntSize& size, CoordinatedSurface::Flags flags, PassRefPtr<ShareableBitmap> bitmap)
</del><ins>+Ref<WebCoordinatedSurface> WebCoordinatedSurface::create(const IntSize& size, CoordinatedSurface::Flags flags, RefPtr<ShareableBitmap> bitmap)
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(*new WebCoordinatedSurface(size, flags, bitmap));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebCoordinatedSurface::WebCoordinatedSurface(const IntSize& size, CoordinatedSurface::Flags flags, PassRefPtr<ShareableBitmap> bitmap)
</del><ins>+WebCoordinatedSurface::WebCoordinatedSurface(const IntSize& size, CoordinatedSurface::Flags flags, RefPtr<ShareableBitmap> bitmap)
</ins><span class="cx"> : CoordinatedSurface(size, flags)
</span><span class="cx"> , m_bitmap(bitmap)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if USE(GRAPHICS_SURFACE)
</span><del>-WebCoordinatedSurface::WebCoordinatedSurface(const WebCore::IntSize& size, CoordinatedSurface::Flags flags, PassRefPtr<WebCore::GraphicsSurface> surface)
</del><ins>+WebCoordinatedSurface::WebCoordinatedSurface(const WebCore::IntSize& size, CoordinatedSurface::Flags flags, RefPtr<WebCore::GraphicsSurface> surface)
</ins><span class="cx"> : CoordinatedSurface(size, flags)
</span><span class="cx"> , m_graphicsSurface(surface)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Ref<WebCoordinatedSurface> WebCoordinatedSurface::create(const IntSize& size, CoordinatedSurface::Flags flags, PassRefPtr<GraphicsSurface> surface)
</del><ins>+Ref<WebCoordinatedSurface> WebCoordinatedSurface::create(const IntSize& size, CoordinatedSurface::Flags flags, RefPtr<GraphicsSurface> surface)
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(*new WebCoordinatedSurface(size, flags, surface));
</span><span class="cx"> }
</span><span class="lines">@@ -155,7 +154,7 @@
</span><span class="cx"> surfaceFlags |= GraphicsSurface::SupportsAlpha;
</span><span class="cx"> RefPtr<GraphicsSurface> surface = GraphicsSurface::create(handle.m_size, surfaceFlags, handle.m_graphicsSurfaceToken);
</span><span class="cx"> if (surface)
</span><del>- return adoptRef(new WebCoordinatedSurface(handle.m_size, handle.m_flags, surface.release()));
</del><ins>+ return adoptRef(new WebCoordinatedSurface(handle.m_size, handle.m_flags, WTFMove(surface)));
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -163,7 +162,7 @@
</span><span class="cx"> if (!bitmap)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return create(handle.m_size, handle.m_flags, bitmap.release());
</del><ins>+ return create(handle.m_size, handle.m_flags, WTFMove(bitmap));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebCoordinatedSurface::createHandle(Handle& handle)
</span><span class="lines">@@ -191,7 +190,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if USE(TEXTURE_MAPPER)
</span><del>-void WebCoordinatedSurface::copyToTexture(PassRefPtr<WebCore::BitmapTexture> passTexture, const IntRect& target, const IntPoint& sourceOffset)
</del><ins>+void WebCoordinatedSurface::copyToTexture(RefPtr<WebCore::BitmapTexture> passTexture, const IntRect& target, const IntPoint& sourceOffset)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<BitmapTexture> texture(passTexture);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedCoordinatedGraphicsWebCoordinatedSurfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -74,22 +74,22 @@
</span><span class="cx"> void paintToSurface(const WebCore::IntRect&, WebCore::CoordinatedSurface::Client*) override;
</span><span class="cx">
</span><span class="cx"> #if USE(TEXTURE_MAPPER)
</span><del>- void copyToTexture(PassRefPtr<WebCore::BitmapTexture>, const WebCore::IntRect& target, const WebCore::IntPoint& sourceOffset) override;
</del><ins>+ void copyToTexture(RefPtr<WebCore::BitmapTexture>, const WebCore::IntRect& target, const WebCore::IntPoint& sourceOffset) override;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- WebCoordinatedSurface(const WebCore::IntSize&, Flags, PassRefPtr<ShareableBitmap>);
</del><ins>+ WebCoordinatedSurface(const WebCore::IntSize&, Flags, RefPtr<ShareableBitmap>);
</ins><span class="cx">
</span><span class="cx"> // Create a WebCoordinatedSurface referencing an existing ShareableBitmap.
</span><del>- static Ref<WebCoordinatedSurface> create(const WebCore::IntSize&, Flags, PassRefPtr<ShareableBitmap>);
</del><ins>+ static Ref<WebCoordinatedSurface> create(const WebCore::IntSize&, Flags, RefPtr<ShareableBitmap>);
</ins><span class="cx">
</span><span class="cx"> std::unique_ptr<WebCore::GraphicsContext> createGraphicsContext(const WebCore::IntRect&);
</span><span class="cx"> #if USE(GRAPHICS_SURFACE)
</span><del>- WebCoordinatedSurface(const WebCore::IntSize&, Flags, PassRefPtr<WebCore::GraphicsSurface>);
</del><ins>+ WebCoordinatedSurface(const WebCore::IntSize&, Flags, RefPtr<WebCore::GraphicsSurface>);
</ins><span class="cx"> // Create a shareable bitmap backed by a graphics surface.
</span><span class="cx"> static RefPtr<WebCoordinatedSurface> createWithSurface(const WebCore::IntSize&, Flags);
</span><span class="cx"> // Create a WebCoordinatedSurface referencing an existing GraphicsSurface.
</span><del>- static Ref<WebCoordinatedSurface> create(const WebCore::IntSize&, Flags, PassRefPtr<WebCore::GraphicsSurface>);
</del><ins>+ static Ref<WebCoordinatedSurface> create(const WebCore::IntSize&, Flags, RefPtr<WebCore::GraphicsSurface>);
</ins><span class="cx">
</span><span class="cx"> bool isBackedByGraphicsSurface() const { return !!m_graphicsSurface; }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedShareableBitmapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ShareableBitmap.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ShareableBitmap.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit2/Shared/ShareableBitmap.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> m_flags = Flag::NoFlags;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<ShareableBitmap> ShareableBitmap::create(const IntSize& size, Flags flags)
</del><ins>+RefPtr<ShareableBitmap> ShareableBitmap::create(const IntSize& size, Flags flags)
</ins><span class="cx"> {
</span><span class="cx"> size_t numBytes = numBytesForSize(size);
</span><span class="cx">
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> return adoptRef(new ShareableBitmap(size, flags, data));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<ShareableBitmap> ShareableBitmap::createShareable(const IntSize& size, Flags flags)
</del><ins>+RefPtr<ShareableBitmap> ShareableBitmap::createShareable(const IntSize& size, Flags flags)
</ins><span class="cx"> {
</span><span class="cx"> size_t numBytes = numBytesForSize(size);
</span><span class="cx">
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> return adoptRef(new ShareableBitmap(size, flags, sharedMemory));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<ShareableBitmap> ShareableBitmap::create(const IntSize& size, Flags flags, PassRefPtr<SharedMemory> sharedMemory)
</del><ins>+RefPtr<ShareableBitmap> ShareableBitmap::create(const IntSize& size, Flags flags, RefPtr<SharedMemory> sharedMemory)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(sharedMemory);
</span><span class="cx">
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> return adoptRef(new ShareableBitmap(size, flags, sharedMemory));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<ShareableBitmap> ShareableBitmap::create(const Handle& handle, SharedMemory::Protection protection)
</del><ins>+RefPtr<ShareableBitmap> ShareableBitmap::create(const Handle& handle, SharedMemory::Protection protection)
</ins><span class="cx"> {
</span><span class="cx"> // Create the shared memory.
</span><span class="cx"> RefPtr<SharedMemory> sharedMemory = SharedMemory::map(handle.m_handle, protection);
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ShareableBitmap::ShareableBitmap(const IntSize& size, Flags flags, PassRefPtr<SharedMemory> sharedMemory)
</del><ins>+ShareableBitmap::ShareableBitmap(const IntSize& size, Flags flags, RefPtr<SharedMemory> sharedMemory)
</ins><span class="cx"> : m_size(size)
</span><span class="cx"> , m_flags(flags)
</span><span class="cx"> , m_sharedMemory(sharedMemory)
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedShareableBitmaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ShareableBitmap.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ShareableBitmap.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit2/Shared/ShareableBitmap.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx">
</span><span class="cx"> #include "SharedMemory.h"
</span><span class="cx"> #include <WebCore/IntRect.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx">
</span><span class="lines">@@ -76,16 +75,16 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> // Create a shareable bitmap that uses malloced memory.
</span><del>- static PassRefPtr<ShareableBitmap> create(const WebCore::IntSize&, Flags);
</del><ins>+ static RefPtr<ShareableBitmap> create(const WebCore::IntSize&, Flags);
</ins><span class="cx">
</span><span class="cx"> // Create a shareable bitmap whose backing memory can be shared with another process.
</span><del>- static PassRefPtr<ShareableBitmap> createShareable(const WebCore::IntSize&, Flags);
</del><ins>+ static RefPtr<ShareableBitmap> createShareable(const WebCore::IntSize&, Flags);
</ins><span class="cx">
</span><span class="cx"> // Create a shareable bitmap from an already existing shared memory block.
</span><del>- static PassRefPtr<ShareableBitmap> create(const WebCore::IntSize&, Flags, PassRefPtr<SharedMemory>);
</del><ins>+ static RefPtr<ShareableBitmap> create(const WebCore::IntSize&, Flags, RefPtr<SharedMemory>);
</ins><span class="cx">
</span><span class="cx"> // Create a shareable bitmap from a handle.
</span><del>- static PassRefPtr<ShareableBitmap> create(const Handle&, SharedMemory::Protection = SharedMemory::Protection::ReadWrite);
</del><ins>+ static RefPtr<ShareableBitmap> create(const Handle&, SharedMemory::Protection = SharedMemory::Protection::ReadWrite);
</ins><span class="cx">
</span><span class="cx"> // Create a handle.
</span><span class="cx"> bool createHandle(Handle&, SharedMemory::Protection = SharedMemory::Protection::ReadWrite);
</span><span class="lines">@@ -106,7 +105,7 @@
</span><span class="cx">
</span><span class="cx"> // This creates a bitmap image that directly references the shared bitmap data.
</span><span class="cx"> // This is only safe to use when we know that the contents of the shareable bitmap won't change.
</span><del>- PassRefPtr<WebCore::Image> createImage();
</del><ins>+ RefPtr<WebCore::Image> createImage();
</ins><span class="cx">
</span><span class="cx"> #if USE(CG)
</span><span class="cx"> // This creates a copied CGImageRef (most likely a copy-on-write) of the shareable bitmap.
</span><span class="lines">@@ -118,12 +117,12 @@
</span><span class="cx"> #elif USE(CAIRO)
</span><span class="cx"> // This creates a BitmapImage that directly references the shared bitmap data.
</span><span class="cx"> // This is only safe to use when we know that the contents of the shareable bitmap won't change.
</span><del>- PassRefPtr<cairo_surface_t> createCairoSurface();
</del><ins>+ RefPtr<cairo_surface_t> createCairoSurface();
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> ShareableBitmap(const WebCore::IntSize&, Flags, void*);
</span><del>- ShareableBitmap(const WebCore::IntSize&, Flags, PassRefPtr<SharedMemory>);
</del><ins>+ ShareableBitmap(const WebCore::IntSize&, Flags, RefPtr<SharedMemory>);
</ins><span class="cx">
</span><span class="cx"> #if USE(CAIRO)
</span><span class="cx"> static size_t numBytesForSize(const WebCore::IntSize&);
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedcairoShareableBitmapCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> return cairo_format_stride_for_width(cairoFormat, size.width()) * size.height();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline PassRefPtr<cairo_surface_t> createSurfaceFromData(void* data, const WebCore::IntSize& size)
</del><ins>+static inline RefPtr<cairo_surface_t> createSurfaceFromData(void* data, const WebCore::IntSize& size)
</ins><span class="cx"> {
</span><span class="cx"> const int stride = cairo_format_stride_for_width(cairoFormat, size.width());
</span><span class="cx"> return adoptRef(cairo_image_surface_create_for_data(static_cast<unsigned char*>(data), cairoFormat, size.width(), size.height(), stride));
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> context.platformContext()->drawSurfaceToContext(surface.get(), destRect, srcRectScaled, context);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<cairo_surface_t> ShareableBitmap::createCairoSurface()
</del><ins>+RefPtr<cairo_surface_t> ShareableBitmap::createCairoSurface()
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<cairo_surface_t> image = createSurfaceFromData(data(), m_size);
</span><span class="cx">
</span><span class="lines">@@ -87,13 +87,13 @@
</span><span class="cx"> static_cast<ShareableBitmap*>(typelessBitmap)->deref(); // Balanced by ref in createCairoSurface.
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Image> ShareableBitmap::createImage()
</del><ins>+RefPtr<Image> ShareableBitmap::createImage()
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<cairo_surface_t> surface = createCairoSurface();
</span><span class="cx"> if (!surface)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><del>- return BitmapImage::create(surface.release());
</del><ins>+ return BitmapImage::create(WTFMove(surface));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedcgShareableBitmapCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/cg/ShareableBitmapCG.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/cg/ShareableBitmapCG.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit2/Shared/cg/ShareableBitmapCG.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -106,13 +106,13 @@
</span><span class="cx"> bitmap->deref(); // Balanced by ref in createCGImage.
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Image> ShareableBitmap::createImage()
</del><ins>+RefPtr<Image> ShareableBitmap::createImage()
</ins><span class="cx"> {
</span><span class="cx"> RetainPtr<CGImageRef> platformImage = makeCGImage();
</span><span class="cx"> if (!platformImage)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return BitmapImage::create(platformImage.get());
</del><ins>+ return BitmapImage::create(WTFMove(platformImage));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsCoordinatedLayerTreeHostcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx"> m_isWaitingForRenderer = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<CoordinatedSurface> CoordinatedLayerTreeHost::createCoordinatedSurface(const IntSize& size, CoordinatedSurface::Flags flags)
</del><ins>+RefPtr<CoordinatedSurface> CoordinatedLayerTreeHost::createCoordinatedSurface(const IntSize& size, CoordinatedSurface::Flags flags)
</ins><span class="cx"> {
</span><span class="cx"> return WebCoordinatedSurface::create(size, flags);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsCoordinatedLayerTreeHosth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">
</span><span class="cx"> void setViewOverlayRootLayer(WebCore::GraphicsLayer*) override;
</span><span class="cx">
</span><del>- static PassRefPtr<WebCore::CoordinatedSurface> createCoordinatedSurface(const WebCore::IntSize&, WebCore::CoordinatedSurface::Flags);
</del><ins>+ static RefPtr<WebCore::CoordinatedSurface> createCoordinatedSurface(const WebCore::IntSize&, WebCore::CoordinatedSurface::Flags);
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> explicit CoordinatedLayerTreeHost(WebPage*);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsThreadedCoordinatedLayerTreeHostcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> scheduleLayerFlush();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<CoordinatedSurface> ThreadedCoordinatedLayerTreeHost::createCoordinatedSurface(const IntSize& size, CoordinatedSurface::Flags flags)
</del><ins>+RefPtr<CoordinatedSurface> ThreadedCoordinatedLayerTreeHost::createCoordinatedSurface(const IntSize& size, CoordinatedSurface::Flags flags)
</ins><span class="cx"> {
</span><span class="cx"> return ThreadSafeCoordinatedSurface::create(size, flags);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsThreadedCoordinatedLayerTreeHosth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h (198654 => 198655)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h        2016-03-25 00:52:40 UTC (rev 198654)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h        2016-03-25 01:13:10 UTC (rev 198655)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void setViewOverlayRootLayer(WebCore::GraphicsLayer*);
</span><del>- static PassRefPtr<WebCore::CoordinatedSurface> createCoordinatedSurface(const WebCore::IntSize&, WebCore::CoordinatedSurface::Flags);
</del><ins>+ static RefPtr<WebCore::CoordinatedSurface> createCoordinatedSurface(const WebCore::IntSize&, WebCore::CoordinatedSurface::Flags);
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> explicit ThreadedCoordinatedLayerTreeHost(WebPage*);
</span></span></pre>
</div>
</div>
</body>
</html>