Closed
Bug 874369
Opened 11 years ago
Closed 11 years ago
Use normal memory instead of Shmem when passing textures between threads on the same process
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: mattwoodrow, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
9.08 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
We spend significant amounts of time allocating Shmem with OMTC, and we are only sharing memory between threads in the same process.
This lets us just normal memory instead in this case, and makes everything happier.
Attachment #752086 -
Flags: review?(bas)
Reporter | ||
Comment 1•11 years ago
|
||
Forgot to qref and include a memory leak fix
Attachment #752086 -
Attachment is obsolete: true
Attachment #752086 -
Flags: review?(bas)
Attachment #752090 -
Flags: review?(bas)
Comment 2•11 years ago
|
||
Comment on attachment 752090 [details] [diff] [review]
Use raw memory v2
Review of attachment 752090 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/ipc/ISurfaceAllocator.cpp
@@ +90,5 @@
> + gfxImageFormat format = aContent == gfxASurface::CONTENT_COLOR_ALPHA ?
> + gfxASurface::ImageFormatARGB32 :
> + gfxASurface::ImageFormatRGB24;
> + int32_t stride = gfxASurface::FormatStrideForWidth(format, aSize.width);
> + unsigned char *data = new unsigned char[stride * aSize.height];
nit: For consistency replace unsigned char by uint8_t.
::: gfx/layers/ipc/ShadowLayerUtilsMac.cpp
@@ +38,5 @@
> + const MemoryImage& image = aSurface.get_MemoryImage();
> + gfxASurface::gfxImageFormat format
> + = static_cast<gfxASurface::gfxImageFormat>(image.format());
> +
> + nsRefPtr<gfxASurface> surf =
Hrm, I wonder if we always want a Quartz surface here or if we want the ability to do something else. For now this should be fine though.
Attachment #752090 -
Flags: review?(bas) → review+
Reporter | ||
Comment 3•11 years ago
|
||
Reporter | ||
Comment 4•11 years ago
|
||
Backed out for causing b2g reftest failures: https://hg.mozilla.org/integration/mozilla-inbound/rev/09ff5b55b27a
Reporter | ||
Comment 5•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/fb160edaec7c
Re-landed with the content -> format conversion implemented correctly.
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Comment 7•11 years ago
|
||
sounds like this fix breaking OMTC SW rendering...
Assertion failure: aDescriptorType == SurfaceDescriptor::TShmem (We can only support Shmem currently), at mozilla-central/gfx/layers/basic/BasicCompositor.cpp:74
You need to log in
before you can comment on or make changes to this bug.
Description
•