Closed Bug 892505 Opened 11 years ago Closed 11 years ago

Implement gfx::Factory::CreateDataSourceSurface

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: nical, Assigned: nical)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Attached patch Implement CreateDataSourceSurface (obsolete) (deleted) — Splinter Review
Assignee: nobody → nical.bugzilla
Attachment #773979 - Flags: review?(jmuizelaar)
Blocks: 858914
Attachment #773979 - Flags: review?(jmuizelaar) → review+
Bas, can I land this in mozilla-central? It goes into Moz2D and I need it for the textures refactoring.
Flags: needinfo?(bas)
Comment on attachment 773979 [details] [diff] [review] Implement CreateDataSourceSurface Review of attachment 773979 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/2d/Factory.cpp @@ +504,5 @@ > +TemporaryRef<DataSourceSurface> > +Factory::CreateDataSourceSurface(const IntSize &aSize, > + SurfaceFormat aFormat) > +{ > + int32_t stride = GetAlignedStride<4>(aSize.width * BytesPerPixel(aFormat)); Please use a 16 byte aligned stride. We should ensure 16-byte aligned allocation as well. This will greatly help us utilize fast SSE2 codepaths. (Possibly we should even be considering 32-byte aligned at this point, but using aligned allocation and stride will make this easy to change in the future) Please grab the code for this from the filters branch in Moz2D, it already has a more involved implementation of this :). https://hg.mozilla.org/users/bschouten_mozilla.com/moz2d/file/42a3532d0948/SourceSurfaceRawData.h
Attachment #773979 - Flags: review-
Sweet thanks, here is the patch with the code extracted from your Moz2D branch. Can I land it in m-c?
Attachment #773979 - Attachment is obsolete: true
Attachment #778386 - Flags: review?(bas)
It's not in the uploaded patch but I also extracted the change to this line to get things to compile (casting to T* rather than uint32_t*): https://hg.mozilla.org/users/bschouten_mozilla.com/moz2d/file/42a3532d0948/Tools.h#l116
Comment on attachment 778386 [details] [diff] [review] create-datasourcesurface-v2.patch Review of attachment 778386 [details] [diff] [review]: ----------------------------------------------------------------- Yeah, you should get that casting change too (whoops), this seems great!
Attachment #778386 - Flags: review?(bas) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Flags: needinfo?(bas)
Blocks: 960378
Depends on: 1020219
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: