RESOLVED FIXED 91897
[Texmap] Performance regression in texture uploads after r121223
https://bugs.webkit.org/show_bug.cgi?id=91897
Summary [Texmap] Performance regression in texture uploads after r121223
Noam Rosenthal
Reported 2012-07-20 13:05:57 PDT
[Texmap] Performance regression in texture uploads after r121223
Attachments
Patch (9.49 KB, patch)
2012-07-20 13:12 PDT, Noam Rosenthal
no flags
Patch (7.06 KB, patch)
2012-07-27 09:56 PDT, Noam Rosenthal
jturcotte: review+
Noam Rosenthal
Comment 1 2012-07-20 13:06:58 PDT
Since we're using GraphicsContext3D::extractImageData, we can't take advantage of desktop GL drivers that support the BGRA extension. This leads to much more time spent in texture uploads for Qt and GTK on desktop.
Noam Rosenthal
Comment 2 2012-07-20 13:12:34 PDT
Kenneth Rohde Christiansen
Comment 3 2012-07-22 10:44:19 PDT
Comment on attachment 153579 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=153579&action=review > Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp:155 > +const uint8_t* GraphicsContext3D::extractRawImageData(Image* image) why not just rawImageData? > Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:490 > #endif > > + > + > +// Extracts the contents of the given Image without copying or formatting. why so many newlines?
Dongseong Hwang
Comment 4 2012-07-22 18:17:11 PDT
I'm sorry for this regression and thank you for fixing it.
Noam Rosenthal
Comment 5 2012-07-27 07:16:32 PDT
Comment on attachment 153579 [details] Patch Need to rework this patch, it causes some color issues on GTK.
Noam Rosenthal
Comment 6 2012-07-27 09:56:31 PDT
Noam Rosenthal
Comment 7 2012-07-27 11:23:17 PDT
Jocelyn Turcotte
Comment 8 2012-07-27 12:42:10 PDT
This wasn't explained here, but the reason for reverting this patch is that it introduced an additional huge performance regression since tile updates from the web process are transferred through a 2000x2000 buffer and there is no way to tell extractImageData to BGRA->RGBA only the part of the buffer that we want. So the whole 2000x2000 buffer is converted each time we need a tiny piece of a tile to be updated. The way to fix it would be to add a partial image extraction capability to GraphicsContext3D, but this would require an implementation for every port. WebGL doesn't need it itself and this doesn't seems like it would be worth it.
Noam Rosenthal
Comment 9 2012-07-27 12:43:38 PDT
(In reply to comment #8) > This wasn't explained here, but the reason for reverting this patch is that it introduced an additional huge performance regression since tile updates from the web process are transferred through a 2000x2000 buffer and there is no way to tell extractImageData to BGRA->RGBA only the part of the buffer that we want. > > So the whole 2000x2000 buffer is converted each time we need a tiny piece of a tile to be updated. > > The way to fix it would be to add a partial image extraction capability to GraphicsContext3D, but this would require an implementation for every port. WebGL doesn't need it itself and this doesn't seems like it would be worth it. Ah, I didn't realize that was the source of the regression. Now it makes more sense!
Note You need to log in before you can comment on or make changes to this bug.