Bug 32763 - [Chromium] Eliminate redundant data copy in GraphicsContext3D readback
: [Chromium] Eliminate redundant data copy in GraphicsContext3D readback
Status: RESOLVED FIXED
: WebKit
WebGL
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-12-18 18:56 PST by
Modified: 2009-12-18 23:13 PST (History)


Attachments
Patch (5.57 KB, patch)
2009-12-18 19:09 PST, Kenneth Russell
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-12-18 18:56:37 PST
Because of my inexperience with the Core Graphics APIs, there is a redundant data copy occurring in GraphicsContext3D while reading back the framebuffer in order to draw it to the Canvas's backing store via CGContextDrawImage. Fixing this will partly address the embarrassing performance gap reported in http://news.cnet.com/8301-30685_3-10416966-264.html?tag=mncol .
------- Comment #1 From 2009-12-18 19:09:30 PST -------
Created an attachment (id=45219) [details]
Patch

Eliminated useless creation of a CGBitmapContext and from there a CGImage. Now create CGImage directly from data. Also changed readPixels parameters and CGImage alpha info to try to avoid byte swapping, and disabled interpolation when drawing the GL content. Some test cases run twice as fast with these changes, though more work is needed to achieve desired performance.

No test case; performance optimization only. Ran WebGL demos from Khronos site to verify changes.
------- Comment #2 From 2009-12-18 19:13:03 PST -------
style-queue ran check-webkit-style on attachment 45219 [details] without any errors.
------- Comment #3 From 2009-12-18 23:12:54 PST -------
(From update of attachment 45219 [details])
Clearing flags on attachment: 45219

Committed r52380: <http://trac.webkit.org/changeset/52380>
------- Comment #4 From 2009-12-18 23:13:00 PST -------
All reviewed patches have been landed.  Closing bug.