| Index: Source/core/rendering/shapes/Shape.cpp
|
| diff --git a/Source/core/rendering/shapes/Shape.cpp b/Source/core/rendering/shapes/Shape.cpp
|
| index 7fcb1d13f014b58af8e1f8fadd58ec5a8b1b1937..a6415e01846e8f18b3629168e2414b8b5e04fc61 100644
|
| --- a/Source/core/rendering/shapes/Shape.cpp
|
| +++ b/Source/core/rendering/shapes/Shape.cpp
|
| @@ -37,6 +37,7 @@
|
| #include "core/rendering/shapes/RectangleShape.h"
|
| #include "platform/LengthFunctions.h"
|
| #include "platform/geometry/FloatSize.h"
|
| +#include "platform/graphics/UnacceleratedImageBufferSurface.h"
|
| #include "platform/graphics/WindRule.h"
|
| #include "wtf/MathExtras.h"
|
| #include "wtf/OwnPtr.h"
|
| @@ -210,15 +211,14 @@ PassOwnPtr<Shape> Shape::createShape(const StyleImage* styleImage, float thresho
|
|
|
| Image* image = styleImage->cachedImage()->image();
|
| const IntSize& imageSize = image->size();
|
| - OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(imageSize);
|
| -
|
| OwnPtr<RasterShapeIntervals> intervals = adoptPtr(new RasterShapeIntervals(imageSize.height()));
|
| -
|
| - if (imageBuffer) {
|
| - GraphicsContext* graphicsContext = imageBuffer->context();
|
| + OwnPtr<ImageBufferSurface> surface = adoptPtr(new UnacceleratedImageBufferSurface(imageSize));
|
| + if (surface->isValid()) {
|
| + ImageBuffer imageBuffer(surface.release());
|
| + GraphicsContext* graphicsContext = imageBuffer.context();
|
| graphicsContext->drawImage(image, IntPoint());
|
|
|
| - RefPtr<Uint8ClampedArray> pixelArray = imageBuffer->getUnmultipliedImageData(IntRect(IntPoint(), imageSize));
|
| + RefPtr<Uint8ClampedArray> pixelArray = imageBuffer.getUnmultipliedImageData(IntRect(IntPoint(), imageSize));
|
| unsigned pixelArrayLength = pixelArray->length();
|
| unsigned pixelArrayOffset = 3; // Each pixel is four bytes: RGBA.
|
| uint8_t alphaPixelThreshold = threshold * 255;
|
|
|