or
if (inBuffer)
resultImage->context().drawImageBuffer(*inBuffer, drawingRegionOfInputImage(in->absolutePaintRect()));
PixelBufferFormat format { AlphaPremultiplication::Unpremultiplied, PixelFormat::RGBA8, DestinationColorSpace::SRGB };
PixelBufferFormat format { AlphaPremultiplication::Unpremultiplied, PixelFormat::RGBA8, resultColorSpace() };
IntRect imageRect(IntPoint(), resultImage->logicalSize());
auto pixelBuffer = resultImage->getPixelBuffer(format, imageRect);
if (!pixelBuffer)
FilterEffect::setResultColorSpace(inputEffect(0)->resultColorSpace());
}
void FEDisplacementMap::transformResultColorSpace(FilterEffect* in, const int index)
{
// Do not transform the first primitive input, as per the spec.
if (index)
in->transformResultColorSpace(operatingColorSpace());
static inline unsigned byteOffsetOfPixel(unsigned x, unsigned y, unsigned rowBytes)
const unsigned bytesPerPixel = 4;
bool setScale(float);
void setResultColorSpace(DestinationColorSpace) override;
void transformResultColorSpace(FilterEffect*, const int) override;
private:
FEDisplacementMap(Filter&, ChannelSelectorType xChannelSelector, ChannelSelectorType yChannelSelector, float);
in->apply();
if (!in->hasResult())
return;
// Convert input results to the current effect's color space.
transformResultColorSpace(in, i);
determineAbsolutePaintRect();
DestinationColorSpace resultColorSpace() const { return m_resultColorSpace; }
virtual void setResultColorSpace(DestinationColorSpace colorSpace) { m_resultColorSpace = colorSpace; }
virtual void transformResultColorSpace(FilterEffect* in, const int) { in->transformResultColorSpace(m_operatingColorSpace); }
void transformResultColorSpace(DestinationColorSpace);
static Vector<float> normalizedFloats(const Vector<float>& values)