[Webkit-unassigned] [Bug 96627] [EFL] Use the shareable GraphicsContext3DOpenGL* implementation.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 28 03:29:03 PDT 2012


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





--- Comment #12 from Simon Hausmann <hausmann at webkit.org>  2012-09-28 03:29:28 PST ---
(From update of attachment 166164)
View in context: https://bugs.webkit.org/attachment.cgi?id=166164&action=review

> Source/WebCore/ChangeLog:15
> +        * PlatformEfl.cmake: Removed cairo implementaion of GC3D and added efl files to WebCore_SOURCES.

implementaion -> implementation

> Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp:205
> +    cairo_rectangle(cr, 0, 0, canvasWidth, canvasHeight);
> +    cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
> +    cairo_paint(cr);
>  
> -void GraphicsContext3D::deleteProgram(Platform3DObject program)
> -{
> -    m_private->deleteProgram(program);
> -}
> +    RefPtr<cairo_surface_t> imageSurface = adoptRef(cairo_image_surface_create_for_data(
> +        const_cast<unsigned char*>(imagePixels), CAIRO_FORMAT_ARGB32, imageWidth, imageHeight, imageWidth * 4));
>  
> -void GraphicsContext3D::deleteRenderbuffer(Platform3DObject buffer)
> -{
> -    m_private->deleteRenderbuffer(buffer);
> -}
> +    // OpenGL keeps the pixels stored bottom up, so we need to flip the image here.
> +    cairo_translate(cr, 0, imageHeight);
> +    cairo_scale(cr, 1, -1);
>  
> -void GraphicsContext3D::deleteShader(Platform3DObject shader)
> -{
> -    m_private->deleteShader(shader);
> -}
> +    cairo_set_operator(cr, CAIRO_OPERATOR_OVER);

Just a thought, but isn't CLEAR + OVER the same as just OPERATOR_SOURCE? I mean, perhaps you can safe an operation here :)

-- 
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