summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/graphics/SVGImageForContainer.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/svg/graphics/SVGImageForContainer.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/svg/graphics/SVGImageForContainer.cpp')
-rw-r--r--Source/WebCore/svg/graphics/SVGImageForContainer.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/Source/WebCore/svg/graphics/SVGImageForContainer.cpp b/Source/WebCore/svg/graphics/SVGImageForContainer.cpp
index 33d78778c..482c39415 100644
--- a/Source/WebCore/svg/graphics/SVGImageForContainer.cpp
+++ b/Source/WebCore/svg/graphics/SVGImageForContainer.cpp
@@ -20,40 +20,35 @@
#include "config.h"
#include "SVGImageForContainer.h"
-#if ENABLE(SVG)
#include "AffineTransform.h"
#include "FloatRect.h"
#include "FloatSize.h"
#include "Image.h"
-#include "SVGImage.h"
namespace WebCore {
-IntSize SVGImageForContainer::size() const
+FloatSize SVGImageForContainer::size() const
{
FloatSize scaledContainerSize(m_containerSize);
scaledContainerSize.scale(m_zoom);
- return roundedIntSize(scaledContainerSize);
+ return FloatSize(roundedIntSize(scaledContainerSize));
}
-void SVGImageForContainer::draw(GraphicsContext* context, const FloatRect& dstRect,
- const FloatRect& srcRect, ColorSpace colorSpace, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription)
+void SVGImageForContainer::draw(GraphicsContext& context, const FloatRect& dstRect,
+ const FloatRect& srcRect, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription)
{
- m_image->drawForContainer(context, m_containerSize, m_zoom, dstRect, srcRect, colorSpace, compositeOp, blendMode);
+ m_image->drawForContainer(context, m_containerSize, m_zoom, dstRect, srcRect, compositeOp, blendMode);
}
-void SVGImageForContainer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
- const FloatPoint& phase, ColorSpace colorSpace, CompositeOperator compositeOp, const FloatRect& dstRect, BlendMode blendMode)
+void SVGImageForContainer::drawPattern(GraphicsContext& context, const FloatRect& dstRect, const FloatRect& srcRect, const AffineTransform& patternTransform,
+ const FloatPoint& phase, const FloatSize& spacing, CompositeOperator compositeOp, BlendMode blendMode)
{
- m_image->setSpaceSize(spaceSize());
- m_image->drawPatternForContainer(context, m_containerSize, m_zoom, srcRect, patternTransform, phase, colorSpace, compositeOp, dstRect, blendMode);
+ m_image->drawPatternForContainer(context, m_containerSize, m_zoom, srcRect, patternTransform, phase, spacing, compositeOp, dstRect, blendMode);
}
-PassNativeImagePtr SVGImageForContainer::nativeImageForCurrentFrame()
+NativeImagePtr SVGImageForContainer::nativeImageForCurrentFrame(const GraphicsContext* targetContext)
{
- return m_image->nativeImageForCurrentFrame();
+ return m_image->nativeImageForCurrentFrame(targetContext);
}
} // namespace WebCore
-
-#endif // ENABLE(SVG)