Closed Bug 800026 Opened 13 years ago Closed 13 years ago

Speed up Canvas putImageData() without filling gfxImageSurface with zeros

Categories

(Core :: Graphics: Canvas2D, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: tete, Assigned: tete)

Details

Attachments

(1 file)

Because GfxImageSurface are created with the argument value of aClear "true" in the following two functions, those gfxImageSurface are filled with zeros by memset. nsCanvasRenderingContext2DAzure::PutImageData_explicit() nsCanvasRenderingContext2D::PutImageData_explicit() But we set a value to every pixel in the gfxImageSurface right after that, so filling the gfxImageSurface with zeros seems to be waste of CPU cycles.
Attachment #670021 - Flags: review?(jmuizelaar)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 670021 [details] [diff] [review] Patch for putImageData rv1.0 Looks great to me.
Attachment #670021 - Flags: review?(jmuizelaar) → review+
I don't see any Try results here, so I've triggered a run. I'll push it if it's green. https://tbpl.mozilla.org/?tree=Try&rev=b8bd135fa1a6 Thanks for the patch, Tete! One request - to make life easier for those checking in on your behalf, please make sure that your future patches follow the guidelines below. Thanks! https://developer.mozilla.org/en-US/docs/Creating_a_patch_that_can_be_checked_in
Assignee: nobody → tete009+bugzilla
Ryan, thank you for letting me know the document. I'll read it carefully so that I can create my patches according to the guidelines. Thank you!
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: