Closed
Bug 906671
Opened 11 years ago
Closed 11 years ago
Use different temporary gl textures in CompositorOGL for different texture target
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
INVALID
People
(Reporter: nical, Assigned: nical)
References
Details
Attachments
(1 file)
6.08 KB,
patch
|
bjacob
:
review-
|
Details | Diff | Splinter Review |
Followup of bug 875211.
It is bad to use a gl texture with several shared textures having different texture targets.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #792254 -
Flags: review?(bjacob)
Comment 2•11 years ago
|
||
Comment on attachment 792254 [details] [diff] [review]
temp-tex-target.patch
Review of attachment 792254 [details] [diff] [review]:
-----------------------------------------------------------------
need one more round :-)
::: gfx/layers/opengl/CompositorOGL.cpp
@@ +284,1 @@
> {
MOZ_ASSERT that index is not too large, check the biggest LOCAL_GL_TEXTUREn constant.
@@ +284,5 @@
> {
> size_t index = aTextureUnit - LOCAL_GL_TEXTURE0;
> +
> + // select the correct array of textures depending on the texture target
> + nsTArray<GLuint>* textureArrayPtr = 0;
nullptr
@@ +293,5 @@
> + case LOCAL_GL_TEXTURE_EXTERNAL:
> + textureArrayPtr = &mTexturesExternal;
> + break;
> + default:
> + MOZ_CRASH("unsupported texture target.");
Please print aTextureTarget as 0x%x. Will help debugging.
@@ +302,2 @@
> // lazily grow the array of temporary textures
> + if (array.Length() <= index) {
You want: EnsureLengthAtLeast
http://mxr.mozilla.org/mozilla-central/source/xpcom/glue/nsTArray.h#1384
Attachment #792254 -
Flags: review?(bjacob) → review-
Assignee | ||
Comment 3•11 years ago
|
||
The new way to bind gralloc buffers (with CompositableQuirks) has the same issue.
Assignee | ||
Comment 4•11 years ago
|
||
err nevermind, actually it does not has the issue since we bind to a new egl image each time.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•