[Webkit-unassigned] [Bug 77148] [Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 2 16:39:35 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=77148


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #125206|review?                     |review+
               Flag|                            |




--- Comment #32 from Martin Robinson <mrobinson at webkit.org>  2012-02-02 16:39:34 PST ---
(From update of attachment 125206)
View in context: https://bugs.webkit.org/attachment.cgi?id=125206&action=review

Okay. I think I understand enough of this to give an r+ now. Very nice. The only change I request is to move the ImageBuffer implementations to another file (perhaps TextureMapperImageBuffer.cpp/h), to reduce the number of classes per-file. Eventually I think it would be nice to move the BitmapTexture classes to their own files too.

> Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp:1338
> +#if ENABLE(3D_RENDERING)

I think you are missing a && USE(TEXTURE_MAPPER) here.

> Source/WebCore/platform/graphics/texmap/TextureMapper.cpp:80
> +class BitmapTextureImageBuffer : public BitmapTexture {
> +    friend class TextureMapperImageBuffer;
> +public:

I think it makes sense to split out the ImageBuffer implementation into a new file.

> Source/WebCore/platform/graphics/texmap/TextureMapper.cpp:194
> +    context->save();
> +    context->setAlpha(opacity);
> +#if ENABLE(3D_RENDERING)
> +    context->concat3DTransform(matrix);
> +#else
> +    context->concatCTM(matrix);
> +#endif
> +    context->drawImageBuffer(image, ColorSpaceDeviceRGB, targetRect);

It seems that if alpha == 1 and the transform is just a 2D translation we could avoid a copy? Perhaps not, but if so it might be a good fast path to add for the future!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list