RESOLVED INVALID 117250
[EFL] GraphicsSurface should flip content only if needed.
https://bugs.webkit.org/show_bug.cgi?id=117250
Summary [EFL] GraphicsSurface should flip content only if needed.
Kalyan
Reported 2013-06-05 05:59:29 PDT
GraphicsSurface has always been used with WebGL and it assumed the content needs to be flipped (texture coordinates are flipped. OpenGL has its origin at bottom-left.) As we plan to use GraphicsSurface for more use cases like accelerated video composition where we do software decoding and upload the contents to texture. Because of the above assumption we have to flip the contents before uploading it to texture which is than flipped again in GraphisSurface side. It would be nice if we flip the contents as needed.
Attachments
patch (9.80 KB, patch)
2013-06-06 13:17 PDT, Kalyan
no flags
patchv2 (10.08 KB, patch)
2013-06-08 13:38 PDT, Kalyan
no flags
patchv3 (7.52 KB, patch)
2013-06-09 09:14 PDT, Kalyan
no flags
Kalyan
Comment 1 2013-06-06 13:17:11 PDT
Kalyan
Comment 2 2013-06-08 13:38:31 PDT
Noam Rosenthal
Comment 3 2013-06-09 00:22:03 PDT
Comment on attachment 204096 [details] patchv2 View in context: https://bugs.webkit.org/attachment.cgi?id=204096&action=review > Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h:56 > + virtual void setOptions(GraphicsSurface::Flags) { } I can't review this part until I see how it's used... Not sure why TextureMapper needs to know about any of this.
Kalyan
Comment 4 2013-06-09 02:42:44 PDT
(In reply to comment #3) > (From update of attachment 204096 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=204096&action=review > > > Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h:56 > > + virtual void setOptions(GraphicsSurface::Flags) { } > > I can't review this part until I see how it's used... > Not sure why TextureMapper needs to know about any of this. This would give a possibility for the classes using GraphicsContext3D to set the needed flags for it's platform layer. i.e in MediaStreamer code: if (m_context3D->getInternalFramebufferSize() != size) { m_context3D->platformLayer()->setOptions(GraphicsSurface::SupportsTextureTarget | GraphicsSurface::SupportsSharing); m_context3D->reshape(size.width(), size.height()); }
Kalyan
Comment 5 2013-06-09 04:36:14 PDT
(In reply to comment #4) > (In reply to comment #3) > > (From update of attachment 204096 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=204096&action=review > > > > > Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h:56 > > > + virtual void setOptions(GraphicsSurface::Flags) { } > > > > I can't review this part until I see how it's used... > > Not sure why TextureMapper needs to know about any of this. > > This would give a possibility for the classes using GraphicsContext3D to set the needed flags for it's platform layer. > > i.e in MediaStreamer code: > > if (m_context3D->getInternalFramebufferSize() != size) { > m_context3D->platformLayer()->setOptions(GraphicsSurface::SupportsTextureTarget | GraphicsSurface::SupportsSharing); > m_context3D->reshape(size.width(), size.height()); > } Other option is to add "HasInvertedY" attribute to GraphicsContext3D(similar to alpha, stencil, shareResources etc). This would by default be true and than in cases like video we could set it to false. GraphicsContext3DPrivate would internally use it to determine appropriate flags for GraphicsSurface. We would not need any changes in TMPL.
Kalyan
Comment 6 2013-06-09 04:37:09 PDT
Comment on attachment 204096 [details] patchv2 Removing request for review. I will try GraphicsContext3D approach
Kalyan
Comment 7 2013-06-09 09:14:35 PDT
Kalyan
Comment 8 2013-06-14 06:52:46 PDT
Will be handled 117118
Note You need to log in before you can comment on or make changes to this bug.