Skip to content

Commit 08d601c

Browse files
committed
Stop using PassRefPtr in platform/graphics
https://bugs.webkit.org/show_bug.cgi?id=171977 Reviewed by Alex Christensen. Source/WebCore: Stop using PassRefPtr in platform/graphics. * css/CSSCrossfadeValue.cpp: (WebCore::CSSCrossfadeValue::image): * css/CSSFilterImageValue.cpp: (WebCore::CSSFilterImageValue::image): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::brokenImage): (WebCore::CachedImage::image): (WebCore::CachedImage::imageForRenderer): * page/PageSerializer.cpp: (WebCore::PageSerializer::addImageToResources): * platform/ScrollView.cpp: (WebCore::ScrollView::paintPanScrollIcon): * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::drawCrossfade): * platform/graphics/FontPlatformData.h: * platform/graphics/GraphicsContext.h: * platform/graphics/Image.cpp: (WebCore::Image::nullImage): * platform/graphics/Image.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::createResourceLoader): * platform/graphics/MediaPlayer.h: * platform/graphics/Pattern.cpp: (WebCore::Pattern::create): (WebCore::Pattern::Pattern): * platform/graphics/Pattern.h: * platform/graphics/PlatformTextTrack.h: (WebCore::PlatformTextTrack::create): (WebCore::PlatformTextTrack::createOutOfBand): (WebCore::PlatformTextTrack::captionMenuOffItem): (WebCore::PlatformTextTrack::captionMenuAutomaticItem): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::create): (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: (WebCore::MediaSelectionOptionAVFObjC::create): (WebCore::MediaSelectionGroupAVFObjC::create): (WebCore::MediaSelectionGroupAVFObjC::updateOptions): * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h: (WebCore::InbandTextTrackPrivateAVCF::create): * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h: (WebCore::InbandTextTrackPrivateLegacyAVCF::create): * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: (WebCore::WebCoreAVCFResourceLoader::create): * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h: * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h: * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage): * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h: * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage): * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h: (WebCore::InbandTextTrackPrivateAVFObjC::create): * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: (WebCore::InbandTextTrackPrivateLegacyAVFObjC::create): * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h: (WebCore::OutOfBandTextTrackPrivateAVF::create): * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h: * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::create): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::createPlatformCALayer): (WebCore::GraphicsLayerCA::createPlatformCAAnimation): (WebCore::GraphicsLayerCA::setContentsToPlatformLayer): (WebCore::GraphicsLayerCA::replicatedLayerRoot): (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): (WebCore::GraphicsLayerCA::createBasicAnimation): (WebCore::GraphicsLayerCA::createKeyframeAnimation): (WebCore::GraphicsLayerCA::createSpringAnimation): * platform/graphics/ca/GraphicsLayerCA.h: (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation): * platform/graphics/ca/PlatformCAAnimation.h: * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h: * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: (PlatformCAAnimationCocoa::create): (PlatformCAAnimationCocoa::copy): * platform/graphics/ca/win/AbstractCACFLayerTreeHost.h: * platform/graphics/ca/win/CACFLayerTreeHost.cpp: (WebCore::CACFLayerTreeHost::create): (WebCore::CACFLayerTreeHost::addPendingAnimatedLayer): * platform/graphics/ca/win/CACFLayerTreeHost.h: * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimationWin::create): (PlatformCAAnimationWin::copy): * platform/graphics/ca/win/PlatformCAAnimationWin.h: * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayerWin::addAnimationForKey): * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: (WebCore::WKCACFViewLayerTreeHost::create): * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h: * platform/graphics/cairo/PatternCairo.cpp: (WebCore::Pattern::createPlatformPattern): * platform/graphics/cairo/PlatformContextCairo.cpp: (WebCore::PlatformContextCairo::clipForPatternFilling): * platform/graphics/cg/PDFDocumentImage.h: * platform/graphics/cg/PatternCG.cpp: (WebCore::Pattern::createPlatformPattern): * platform/graphics/filters/FEDiffuseLighting.cpp: (WebCore::FEDiffuseLighting::FEDiffuseLighting): (WebCore::FEDiffuseLighting::create): (WebCore::FEDiffuseLighting::lightSource): * platform/graphics/filters/FEDiffuseLighting.h: * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::FELighting): (WebCore::FELighting::drawLighting): * platform/graphics/filters/FELighting.h: * platform/graphics/filters/FESpecularLighting.cpp: (WebCore::FESpecularLighting::FESpecularLighting): (WebCore::FESpecularLighting::create): (WebCore::FESpecularLighting::lightSource): * platform/graphics/filters/FESpecularLighting.h: * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::asUnmultipliedImage): (WebCore::FilterEffect::asPremultipliedImage): * platform/graphics/filters/FilterEffect.h: * platform/graphics/filters/FilterOperation.cpp: (WebCore::ReferenceFilterOperation::setFilterEffect): (WebCore::BasicColorMatrixFilterOperation::blend): (WebCore::BasicComponentTransferFilterOperation::blend): (WebCore::BlurFilterOperation::blend): (WebCore::DropShadowFilterOperation::blend): * platform/graphics/filters/FilterOperation.h: (WebCore::FilterOperation::blend): (WebCore::PassthroughFilterOperation::create): (WebCore::ReferenceFilterOperation::create): * platform/graphics/gpu/Texture.cpp: (WebCore::Texture::create): * platform/graphics/gpu/Texture.h: * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: * platform/graphics/gstreamer/ImageGStreamer.h: (WebCore::ImageGStreamer::createImage): (WebCore::ImageGStreamer::image): * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: (WebCore::InbandTextTrackPrivateGStreamer::create): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::paint): * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp: (WebCore::MediaSourceClientGStreamerMSE::enqueueSample): * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h: * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp: * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: (WebCore::PlaybackPipeline::enqueueSample): * platform/graphics/gstreamer/mse/PlaybackPipeline.h: * platform/graphics/gtk/ImageGtk.cpp: (WebCore::loadImageFromGResource): (WebCore::loadResourceSharedBuffer): (WebCore::loadMissingImageIconFromTheme): (WebCore::Image::loadPlatformResource): * platform/graphics/harfbuzz/HarfBuzzFace.cpp: (WebCore::FaceCacheEntry::create): * platform/graphics/harfbuzz/HarfBuzzFace.h: (WebCore::HarfBuzzFace::create): * platform/graphics/mac/ImageMac.mm: (WebCore::Image::loadPlatformResource): * platform/graphics/opentype/OpenTypeMathData.h: (WebCore::OpenTypeMathData::create): * platform/graphics/texmap/BitmapTexture.h: (WebCore::BitmapTexture::applyFilters): * platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::applyFilters): * platform/graphics/texmap/BitmapTextureGL.h: (WebCore::BitmapTextureGL::FilterInfo::FilterInfo): * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::commitLayerChanges): * platform/graphics/texmap/TextureMapper.cpp: (WebCore::TextureMapper::acquireTextureFromPool): * platform/graphics/texmap/TextureMapper.h: * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::createTexture): * platform/graphics/texmap/TextureMapperGL.h: * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::paintIntoSurface): (WebCore::commitSurface): (WebCore::TextureMapperLayer::paintWithIntermediateSurface): (WebCore::TextureMapperLayer::setBackingStore): * platform/graphics/texmap/TextureMapperLayer.h: * platform/graphics/texmap/TextureMapperTiledBackingStore.h: (WebCore::TextureMapperTiledBackingStore::create): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::syncImageBacking): * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: (WebCore::CoordinatedImageBacking::create): (WebCore::CoordinatedImageBacking::CoordinatedImageBacking): * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h: * platform/graphics/win/ImageWin.cpp: (WebCore::Image::loadPlatformResource): * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: (WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer): * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: * platform/graphics/win/PatternDirect2D.cpp: (WebCore::Pattern::createPlatformPattern): * platform/graphics/win/SharedGDIObject.h: (WebCore::SharedGDIObject::create): * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::build): * rendering/RenderImageResource.cpp: (WebCore::RenderImageResource::image): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::drawPlatformResizerImage): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::buildPattern): * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute): (WebCore::SVGFEDiffuseLightingElement::build): * svg/SVGFESpecularLightingElement.cpp: (WebCore::SVGFESpecularLightingElement::setFilterEffectAttribute): (WebCore::SVGFESpecularLightingElement::build): * svg/graphics/SVGImageCache.cpp: (WebCore::SVGImageCache::imageForRenderer): Source/WebKit/win: Build fix. * FullscreenVideoController.cpp: (FullscreenVideoController::enterFullscreen): * WebKitDLL.cpp: (loadResourceIntoBuffer): Source/WebKit2: Build fix. * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::CoordinatedGraphicsScene::createBackingStoreIfNeeded): (WebKit::CoordinatedGraphicsScene::removeBackingStoreIfNeeded): * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<Cursor>::decode): * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: (WebKit::CompositingCoordinator::createImageBackingIfNeeded): * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h: * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp: (WebKit::GraphicsLayerCARemote::createPlatformCALayer): (WebKit::GraphicsLayerCARemote::createPlatformCAAnimation): * WebProcess/WebPage/mac/GraphicsLayerCARemote.h: * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h: * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: (WebKit::PlatformCAAnimationRemote::copy): Canonical link: https://commits.webkit.org/188922@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent db77c2e commit 08d601c

121 files changed

Lines changed: 656 additions & 430 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Source/WebCore/ChangeLog

Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,236 @@
1+
2017-05-11 Chris Dumez <cdumez@apple.com>
2+
3+
Stop using PassRefPtr in platform/graphics
4+
https://bugs.webkit.org/show_bug.cgi?id=171977
5+
6+
Reviewed by Alex Christensen.
7+
8+
Stop using PassRefPtr in platform/graphics.
9+
10+
* css/CSSCrossfadeValue.cpp:
11+
(WebCore::CSSCrossfadeValue::image):
12+
* css/CSSFilterImageValue.cpp:
13+
(WebCore::CSSFilterImageValue::image):
14+
* loader/cache/CachedImage.cpp:
15+
(WebCore::CachedImage::brokenImage):
16+
(WebCore::CachedImage::image):
17+
(WebCore::CachedImage::imageForRenderer):
18+
* page/PageSerializer.cpp:
19+
(WebCore::PageSerializer::addImageToResources):
20+
* platform/ScrollView.cpp:
21+
(WebCore::ScrollView::paintPanScrollIcon):
22+
* platform/graphics/CrossfadeGeneratedImage.cpp:
23+
(WebCore::CrossfadeGeneratedImage::drawCrossfade):
24+
* platform/graphics/FontPlatformData.h:
25+
* platform/graphics/GraphicsContext.h:
26+
* platform/graphics/Image.cpp:
27+
(WebCore::Image::nullImage):
28+
* platform/graphics/Image.h:
29+
* platform/graphics/MediaPlayer.cpp:
30+
(WebCore::MediaPlayer::createResourceLoader):
31+
* platform/graphics/MediaPlayer.h:
32+
* platform/graphics/Pattern.cpp:
33+
(WebCore::Pattern::create):
34+
(WebCore::Pattern::Pattern):
35+
* platform/graphics/Pattern.h:
36+
* platform/graphics/PlatformTextTrack.h:
37+
(WebCore::PlatformTextTrack::create):
38+
(WebCore::PlatformTextTrack::createOutOfBand):
39+
(WebCore::PlatformTextTrack::captionMenuOffItem):
40+
(WebCore::PlatformTextTrack::captionMenuAutomaticItem):
41+
* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
42+
(WebCore::InbandMetadataTextTrackPrivateAVF::create):
43+
(WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
44+
* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
45+
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
46+
(WebCore::InbandTextTrackPrivateAVF::processAttributedStrings):
47+
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
48+
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
49+
(WebCore::MediaSelectionOptionAVFObjC::create):
50+
(WebCore::MediaSelectionGroupAVFObjC::create):
51+
(WebCore::MediaSelectionGroupAVFObjC::updateOptions):
52+
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
53+
(WebCore::InbandTextTrackPrivateAVCF::create):
54+
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h:
55+
(WebCore::InbandTextTrackPrivateLegacyAVCF::create):
56+
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
57+
(WebCore::WebCoreAVCFResourceLoader::create):
58+
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h:
59+
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
60+
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
61+
(WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
62+
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
63+
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
64+
(WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
65+
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
66+
(WebCore::InbandTextTrackPrivateAVFObjC::create):
67+
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h:
68+
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::create):
69+
* platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
70+
(WebCore::OutOfBandTextTrackPrivateAVF::create):
71+
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
72+
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
73+
(WebCore::WebCoreAVFResourceLoader::create):
74+
* platform/graphics/ca/GraphicsLayerCA.cpp:
75+
(WebCore::GraphicsLayerCA::createPlatformCALayer):
76+
(WebCore::GraphicsLayerCA::createPlatformCAAnimation):
77+
(WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
78+
(WebCore::GraphicsLayerCA::replicatedLayerRoot):
79+
(WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
80+
(WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
81+
(WebCore::GraphicsLayerCA::createBasicAnimation):
82+
(WebCore::GraphicsLayerCA::createKeyframeAnimation):
83+
(WebCore::GraphicsLayerCA::createSpringAnimation):
84+
* platform/graphics/ca/GraphicsLayerCA.h:
85+
(WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
86+
* platform/graphics/ca/PlatformCAAnimation.h:
87+
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h:
88+
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
89+
(PlatformCAAnimationCocoa::create):
90+
(PlatformCAAnimationCocoa::copy):
91+
* platform/graphics/ca/win/AbstractCACFLayerTreeHost.h:
92+
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
93+
(WebCore::CACFLayerTreeHost::create):
94+
(WebCore::CACFLayerTreeHost::addPendingAnimatedLayer):
95+
* platform/graphics/ca/win/CACFLayerTreeHost.h:
96+
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
97+
(PlatformCAAnimationWin::create):
98+
(PlatformCAAnimationWin::copy):
99+
* platform/graphics/ca/win/PlatformCAAnimationWin.h:
100+
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
101+
(PlatformCALayerWin::addAnimationForKey):
102+
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
103+
(WebCore::WKCACFViewLayerTreeHost::create):
104+
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
105+
* platform/graphics/cairo/PatternCairo.cpp:
106+
(WebCore::Pattern::createPlatformPattern):
107+
* platform/graphics/cairo/PlatformContextCairo.cpp:
108+
(WebCore::PlatformContextCairo::clipForPatternFilling):
109+
* platform/graphics/cg/PDFDocumentImage.h:
110+
* platform/graphics/cg/PatternCG.cpp:
111+
(WebCore::Pattern::createPlatformPattern):
112+
* platform/graphics/filters/FEDiffuseLighting.cpp:
113+
(WebCore::FEDiffuseLighting::FEDiffuseLighting):
114+
(WebCore::FEDiffuseLighting::create):
115+
(WebCore::FEDiffuseLighting::lightSource):
116+
* platform/graphics/filters/FEDiffuseLighting.h:
117+
* platform/graphics/filters/FELighting.cpp:
118+
(WebCore::FELighting::FELighting):
119+
(WebCore::FELighting::drawLighting):
120+
* platform/graphics/filters/FELighting.h:
121+
* platform/graphics/filters/FESpecularLighting.cpp:
122+
(WebCore::FESpecularLighting::FESpecularLighting):
123+
(WebCore::FESpecularLighting::create):
124+
(WebCore::FESpecularLighting::lightSource):
125+
* platform/graphics/filters/FESpecularLighting.h:
126+
* platform/graphics/filters/FETile.cpp:
127+
(WebCore::FETile::platformApplySoftware):
128+
* platform/graphics/filters/FilterEffect.cpp:
129+
(WebCore::FilterEffect::asUnmultipliedImage):
130+
(WebCore::FilterEffect::asPremultipliedImage):
131+
* platform/graphics/filters/FilterEffect.h:
132+
* platform/graphics/filters/FilterOperation.cpp:
133+
(WebCore::ReferenceFilterOperation::setFilterEffect):
134+
(WebCore::BasicColorMatrixFilterOperation::blend):
135+
(WebCore::BasicComponentTransferFilterOperation::blend):
136+
(WebCore::BlurFilterOperation::blend):
137+
(WebCore::DropShadowFilterOperation::blend):
138+
* platform/graphics/filters/FilterOperation.h:
139+
(WebCore::FilterOperation::blend):
140+
(WebCore::PassthroughFilterOperation::create):
141+
(WebCore::ReferenceFilterOperation::create):
142+
* platform/graphics/gpu/Texture.cpp:
143+
(WebCore::Texture::create):
144+
* platform/graphics/gpu/Texture.h:
145+
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
146+
* platform/graphics/gstreamer/ImageGStreamer.h:
147+
(WebCore::ImageGStreamer::createImage):
148+
(WebCore::ImageGStreamer::image):
149+
* platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
150+
(WebCore::InbandMetadataTextTrackPrivateGStreamer::create):
151+
(WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue):
152+
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
153+
(WebCore::InbandTextTrackPrivateGStreamer::create):
154+
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
155+
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
156+
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
157+
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
158+
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:
159+
* platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
160+
(WebCore::MediaSourceClientGStreamerMSE::enqueueSample):
161+
* platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
162+
* platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp:
163+
* platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
164+
(WebCore::PlaybackPipeline::enqueueSample):
165+
* platform/graphics/gstreamer/mse/PlaybackPipeline.h:
166+
* platform/graphics/gtk/ImageGtk.cpp:
167+
(WebCore::loadImageFromGResource):
168+
(WebCore::loadResourceSharedBuffer):
169+
(WebCore::loadMissingImageIconFromTheme):
170+
(WebCore::Image::loadPlatformResource):
171+
* platform/graphics/harfbuzz/HarfBuzzFace.cpp:
172+
(WebCore::FaceCacheEntry::create):
173+
* platform/graphics/harfbuzz/HarfBuzzFace.h:
174+
(WebCore::HarfBuzzFace::create):
175+
* platform/graphics/mac/ImageMac.mm:
176+
(WebCore::Image::loadPlatformResource):
177+
* platform/graphics/opentype/OpenTypeMathData.h:
178+
(WebCore::OpenTypeMathData::create):
179+
* platform/graphics/texmap/BitmapTexture.h:
180+
(WebCore::BitmapTexture::applyFilters):
181+
* platform/graphics/texmap/BitmapTextureGL.cpp:
182+
(WebCore::BitmapTextureGL::applyFilters):
183+
* platform/graphics/texmap/BitmapTextureGL.h:
184+
(WebCore::BitmapTextureGL::FilterInfo::FilterInfo):
185+
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
186+
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
187+
* platform/graphics/texmap/TextureMapper.cpp:
188+
(WebCore::TextureMapper::acquireTextureFromPool):
189+
* platform/graphics/texmap/TextureMapper.h:
190+
* platform/graphics/texmap/TextureMapperGL.cpp:
191+
(WebCore::TextureMapperGL::createTexture):
192+
* platform/graphics/texmap/TextureMapperGL.h:
193+
* platform/graphics/texmap/TextureMapperLayer.cpp:
194+
(WebCore::TextureMapperLayer::paintIntoSurface):
195+
(WebCore::commitSurface):
196+
(WebCore::TextureMapperLayer::paintWithIntermediateSurface):
197+
(WebCore::TextureMapperLayer::setBackingStore):
198+
* platform/graphics/texmap/TextureMapperLayer.h:
199+
* platform/graphics/texmap/TextureMapperTiledBackingStore.h:
200+
(WebCore::TextureMapperTiledBackingStore::create):
201+
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
202+
(WebCore::CoordinatedGraphicsLayer::syncImageBacking):
203+
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
204+
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
205+
(WebCore::CoordinatedImageBacking::create):
206+
(WebCore::CoordinatedImageBacking::CoordinatedImageBacking):
207+
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
208+
* platform/graphics/win/ImageWin.cpp:
209+
(WebCore::Image::loadPlatformResource):
210+
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
211+
(WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
212+
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
213+
* platform/graphics/win/PatternDirect2D.cpp:
214+
(WebCore::Pattern::createPlatformPattern):
215+
* platform/graphics/win/SharedGDIObject.h:
216+
(WebCore::SharedGDIObject::create):
217+
* rendering/FilterEffectRenderer.cpp:
218+
(WebCore::FilterEffectRenderer::build):
219+
* rendering/RenderImageResource.cpp:
220+
(WebCore::RenderImageResource::image):
221+
* rendering/RenderLayer.cpp:
222+
(WebCore::RenderLayer::drawPlatformResizerImage):
223+
* rendering/svg/RenderSVGResourcePattern.cpp:
224+
(WebCore::RenderSVGResourcePattern::buildPattern):
225+
* svg/SVGFEDiffuseLightingElement.cpp:
226+
(WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
227+
(WebCore::SVGFEDiffuseLightingElement::build):
228+
* svg/SVGFESpecularLightingElement.cpp:
229+
(WebCore::SVGFESpecularLightingElement::setFilterEffectAttribute):
230+
(WebCore::SVGFESpecularLightingElement::build):
231+
* svg/graphics/SVGImageCache.cpp:
232+
(WebCore::SVGImageCache::imageForRenderer):
233+
1234
2017-05-11 Joseph Pecoraro <pecoraro@apple.com>
2235

3236
Remove Vibration API

Source/WebCore/css/CSSCrossfadeValue.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ Image* CSSCrossfadeValue::image(RenderElement& renderer, const FloatSize& size)
186186
auto* cachedToImage = cachedImageForCSSValue(m_toValue, cachedResourceLoader, options);
187187

188188
if (!cachedFromImage || !cachedToImage)
189-
return Image::nullImage();
189+
return &Image::nullImage();
190190

191191
auto* fromImage = cachedFromImage->imageForRenderer(&renderer);
192192
auto* toImage = cachedToImage->imageForRenderer(&renderer);
193193

194194
if (!fromImage || !toImage)
195-
return Image::nullImage();
195+
return &Image::nullImage();
196196

197197
m_generatedImage = CrossfadeGeneratedImage::create(*fromImage, *toImage, m_percentageValue->floatValue(), fixedSize(renderer), size);
198198
return m_generatedImage.get();

Source/WebCore/css/CSSFilterImageValue.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,17 @@ RefPtr<Image> CSSFilterImageValue::image(RenderElement* renderer, const FloatSiz
120120
ResourceLoaderOptions options = CachedResourceLoader::defaultCachedResourceOptions();
121121
auto* cachedImage = cachedImageForCSSValue(m_imageValue, renderer->document().cachedResourceLoader(), options);
122122
if (!cachedImage)
123-
return Image::nullImage();
123+
return &Image::nullImage();
124124

125125
auto* image = cachedImage->imageForRenderer(renderer);
126126
if (!image)
127-
return Image::nullImage();
127+
return &Image::nullImage();
128128

129129
// Transform Image into ImageBuffer.
130130
// FIXME (149424): This buffer should not be unconditionally unaccelerated.
131131
auto texture = ImageBuffer::create(size, Unaccelerated);
132132
if (!texture)
133-
return Image::nullImage();
133+
return &Image::nullImage();
134134

135135
auto imageRect = FloatRect { { }, size };
136136
texture->context().drawImage(*image, imageRect);
@@ -140,7 +140,7 @@ RefPtr<Image> CSSFilterImageValue::image(RenderElement* renderer, const FloatSiz
140140
filterRenderer->setSourceImageRect(imageRect);
141141
filterRenderer->setFilterRegion(imageRect);
142142
if (!filterRenderer->build(*renderer, m_filterOperations, FilterFunction))
143-
return Image::nullImage();
143+
return &Image::nullImage();
144144
filterRenderer->apply();
145145

146146
return filterRenderer->output()->copyImage();

Source/WebCore/loader/cache/CachedImage.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,16 @@ void CachedImage::allClientsRemoved()
167167
std::pair<Image*, float> CachedImage::brokenImage(float deviceScaleFactor) const
168168
{
169169
if (deviceScaleFactor >= 3) {
170-
static NeverDestroyed<Image*> brokenImageVeryHiRes(Image::loadPlatformResource("missingImage@3x").leakRef());
170+
static NeverDestroyed<Image*> brokenImageVeryHiRes(&Image::loadPlatformResource("missingImage@3x").leakRef());
171171
return std::make_pair(brokenImageVeryHiRes, 3);
172172
}
173173

174174
if (deviceScaleFactor >= 2) {
175-
static NeverDestroyed<Image*> brokenImageHiRes(Image::loadPlatformResource("missingImage@2x").leakRef());
175+
static NeverDestroyed<Image*> brokenImageHiRes(&Image::loadPlatformResource("missingImage@2x").leakRef());
176176
return std::make_pair(brokenImageHiRes, 2);
177177
}
178178

179-
static NeverDestroyed<Image*> brokenImageLoRes(Image::loadPlatformResource("missingImage").leakRef());
179+
static NeverDestroyed<Image*> brokenImageLoRes(&Image::loadPlatformResource("missingImage").leakRef());
180180
return std::make_pair(brokenImageLoRes, 1);
181181
}
182182

@@ -197,7 +197,7 @@ Image* CachedImage::image()
197197
if (m_image)
198198
return m_image.get();
199199

200-
return Image::nullImage();
200+
return &Image::nullImage();
201201
}
202202

203203
Image* CachedImage::imageForRenderer(const RenderObject* renderer)
@@ -210,11 +210,11 @@ Image* CachedImage::imageForRenderer(const RenderObject* renderer)
210210
}
211211

212212
if (!m_image)
213-
return Image::nullImage();
213+
return &Image::nullImage();
214214

215215
if (m_image->isSVGImage()) {
216216
Image* image = m_svgImageCache->imageForRenderer(renderer);
217-
if (image != Image::nullImage())
217+
if (image != &Image::nullImage())
218218
return image;
219219
}
220220
return m_image.get();

Source/WebCore/page/PageSerializer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ void PageSerializer::addImageToResources(CachedImage* image, RenderElement* imag
276276
if (!url.isValid() || m_resourceURLs.contains(url))
277277
return;
278278

279-
if (!image || image->image() == Image::nullImage())
279+
if (!image || image->image() == &Image::nullImage())
280280
return;
281281

282282
RefPtr<SharedBuffer> data = imageRenderer ? image->imageForRenderer(imageRenderer)->data() : 0;

Source/WebCore/platform/ScrollView.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,13 +1157,11 @@ void ScrollView::paintScrollbars(GraphicsContext& context, const IntRect& rect)
11571157

11581158
void ScrollView::paintPanScrollIcon(GraphicsContext& context)
11591159
{
1160-
static Image* panScrollIcon = Image::loadPlatformResource("panIcon").leakRef();
1161-
if (!panScrollIcon)
1162-
return;
1160+
static Image& panScrollIcon = Image::loadPlatformResource("panIcon").leakRef();
11631161
IntPoint iconGCPoint = m_panScrollIconPoint;
11641162
if (parent())
11651163
iconGCPoint = parent()->windowToContents(iconGCPoint);
1166-
context.drawImage(*panScrollIcon, iconGCPoint);
1164+
context.drawImage(panScrollIcon, iconGCPoint);
11671165
}
11681166

11691167
void ScrollView::paint(GraphicsContext& context, const IntRect& rect, SecurityOriginPaintPolicy securityOriginPaintPolicy)

Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static void drawCrossfadeSubimage(GraphicsContext& context, Image& image, Compos
7272
void CrossfadeGeneratedImage::drawCrossfade(GraphicsContext& context)
7373
{
7474
// Draw nothing if either of the images hasn't loaded yet.
75-
if (m_fromImage.ptr() == Image::nullImage() || m_toImage.ptr() == Image::nullImage())
75+
if (m_fromImage.ptr() == &Image::nullImage() || m_toImage.ptr() == &Image::nullImage())
7676
return;
7777

7878
GraphicsContextStateSaver stateSaver(context);

Source/WebCore/platform/graphics/FontPlatformData.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
#include "TextFlags.h"
2828
#include <wtf/Forward.h>
29-
#include <wtf/PassRefPtr.h>
3029
#include <wtf/RefCounted.h>
3130
#include <wtf/RetainPtr.h>
3231
#include <wtf/text/StringImpl.h>

Source/WebCore/platform/graphics/GraphicsContext.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ class GraphicsContext {
507507
HDC hdc() const;
508508
#if PLATFORM(WIN)
509509
#if USE(WINGDI)
510-
void setBitmap(PassRefPtr<SharedBitmap>);
511510
const AffineTransform& affineTransform() const;
512511
AffineTransform& affineTransform();
513512
void resetAffineTransform();

Source/WebCore/platform/graphics/Image.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ Image::~Image()
5454
{
5555
}
5656

57-
Image* Image::nullImage()
57+
Image& Image::nullImage()
5858
{
5959
ASSERT(isMainThread());
6060
static Image& nullImage = BitmapImage::create().leakRef();
61-
return &nullImage;
61+
return nullImage;
6262
}
6363

6464
bool Image::supportsType(const String& type)

0 commit comments

Comments
 (0)