Closed
Bug 892505
Opened 11 years ago
Closed 11 years ago
Implement gfx::Factory::CreateDataSourceSurface
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: nical, Assigned: nical)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee: nobody → nical.bugzilla
Attachment #773979 -
Flags: review?(jmuizelaar)
Updated•11 years ago
|
Attachment #773979 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 2•11 years ago
|
||
Bas, can I land this in mozilla-central? It goes into Moz2D and I need it for the textures refactoring.
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(bas)
Comment 3•11 years ago
|
||
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-
Assignee | ||
Comment 4•11 years ago
|
||
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)
Assignee | ||
Comment 5•11 years ago
|
||
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 6•11 years ago
|
||
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+
Assignee | ||
Comment 7•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(bas)
You need to log in
before you can comment on or make changes to this bug.
Description
•