ImageBuffer::create should return a std::unique_ptr instead of OwnPtr.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Nov 2013 22:58:17 +0000 (22:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Nov 2013 22:58:17 +0000 (22:58 +0000)
commitd31556166bb52bd887cb472b7a189b42f47be016
tree4665c13615f474b5fad9710f1335f205002f9797
parent049c41e7958293264da58a828c33a14995fefc67
ImageBuffer::create should return a std::unique_ptr instead of OwnPtr.
https://bugs.webkit.org/show_bug.cgi?id=124822

Patch by Brian J. Burg <burg@cs.washington.edu> on 2013-11-26
Reviewed by Andreas Kling.

Replace all uses of OwnPtr<ImageBuffer> and PassOwnPtr<ImageBuffer> with
std::unique_ptr<ImageBuffer>. Replace calls to OwnPtr::clear() and
OwnPtr::release() with reset() and std::move(). Remove unnecessary includes.

No new tests. This is a mechanical refactoring.

* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::image):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::setSurfaceSize):
* html/HTMLCanvasElement.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createCompositingBuffer):
(WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
(WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache):
(WebCore::WebGLRenderingContext::LRUImageBufferCache::imageBuffer):
* html/canvas/WebGLRenderingContext.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* page/Frame.cpp:
(WebCore::Frame::nodeImage):
(WebCore::Frame::dragImageForSelection):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::drawPattern):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/GradientImage.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::createCompatibleBuffer):
* platform/graphics/GraphicsContext.h:
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::createCompatibleBuffer):
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::create):
* platform/graphics/ShadowBlur.cpp:
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::putByteArray):
* platform/graphics/cg/PDFDocumentImage.h:
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware):
* platform/graphics/filters/Filter.h:
(WebCore::Filter::setSourceImage):
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::clearResult):
* platform/graphics/filters/FilterEffect.h:
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::BitmapTexture::updateContents):
* platform/graphics/texmap/TextureMapperImageBuffer.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::invalidateBufferedForeground):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::postApplyResource):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceGradient.cpp: Remove method parameter wrapping/indentation.
(WebCore::createMaskAndSwapContextForTextGradient):
(WebCore::clipToTextMask):
(WebCore::RenderSVGResourceGradient::applyResource):
* rendering/svg/RenderSVGResourceGradient.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.cpp: Remove method parameter wrapping/indentation.
(WebCore::RenderSVGResourcePattern::buildPattern):
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/RenderSVGResourcePattern.h: Remove method parameter wrapping/indentation.
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::createImageBuffer):
(WebCore::SVGRenderingContext::createImageBufferForPattern):
(WebCore::SVGRenderingContext::clipToImageBuffer):
(WebCore::SVGRenderingContext::bufferForeground):
* rendering/svg/SVGRenderingContext.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::nativeImageForCurrentFrame):
(WebCore::SVGImage::drawPatternForContainer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
45 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSFilterImageValue.cpp
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/html/HTMLCanvasElement.h
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.h
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.h
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/platform/graphics/BitmapImage.cpp
Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
Source/WebCore/platform/graphics/GradientImage.h
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/ImageBuffer.cpp
Source/WebCore/platform/graphics/ImageBuffer.h
Source/WebCore/platform/graphics/ShadowBlur.cpp
Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
Source/WebCore/platform/graphics/cg/PDFDocumentImage.h
Source/WebCore/platform/graphics/filters/FETile.cpp
Source/WebCore/platform/graphics/filters/Filter.h
Source/WebCore/platform/graphics/filters/FilterEffect.cpp
Source/WebCore/platform/graphics/filters/FilterEffect.h
Source/WebCore/platform/graphics/texmap/TextureMapper.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/shapes/Shape.cpp
Source/WebCore/rendering/svg/RenderSVGImage.cpp
Source/WebCore/rendering/svg/RenderSVGImage.h
Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
Source/WebCore/rendering/svg/RenderSVGResourceClipper.h
Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
Source/WebCore/rendering/svg/RenderSVGResourceFilter.h
Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp
Source/WebCore/rendering/svg/RenderSVGResourceGradient.h
Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
Source/WebCore/rendering/svg/RenderSVGResourceMasker.h
Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp
Source/WebCore/rendering/svg/RenderSVGResourcePattern.h
Source/WebCore/rendering/svg/SVGRenderingContext.cpp
Source/WebCore/rendering/svg/SVGRenderingContext.h
Source/WebCore/svg/graphics/SVGImage.cpp