Last Comment Bug 800026 - Speed up Canvas putImageData() without filling gfxImageSurface with zeros
: Speed up Canvas putImageData() without filling gfxImageSurface with zeros
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla19
Assigned To: Tetsuro Kato (tete)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-10 10:05 PDT by Tetsuro Kato (tete)
Modified: 2012-10-11 12:06 PDT (History)
4 users (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch for putImageData rv1.0 (1.96 KB, patch)
2012-10-10 10:05 PDT, Tetsuro Kato (tete)
jmuizelaar: review+
Details | Diff | Review

Description Tetsuro Kato (tete) 2012-10-10 10:05:40 PDT
Created attachment 670021 [details] [diff] [review]
Patch for putImageData rv1.0

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.
Comment 1 Jeff Muizelaar [:jrmuizel] 2012-10-10 12:33:44 PDT
Comment on attachment 670021 [details] [diff] [review]
Patch for putImageData rv1.0

Looks great to me.
Comment 2 Ryan VanderMeulen [:RyanVM] 2012-10-10 18:27:20 PDT
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
Comment 3 Tetsuro Kato (tete) 2012-10-10 19:20:41 PDT
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!
Comment 4 Ryan VanderMeulen [:RyanVM] 2012-10-11 03:28:14 PDT
Looks green. Thanks again!

https://hg.mozilla.org/integration/mozilla-inbound/rev/8766ced01b38
Comment 5 Ed Morley [:emorley] 2012-10-11 12:06:09 PDT
https://hg.mozilla.org/mozilla-central/rev/8766ced01b38

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