Closed
Bug 956268
Opened 11 years ago
Closed 11 years ago
Use DrawElements instead of DrawArrays in CompositorOGL::BindAndDrawQuad
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
INVALID
People
(Reporter: mstange, Assigned: mstange)
References
Details
Attachments
(2 files)
3.31 KB,
patch
|
jgilbert
:
review-
|
Details | Diff | Splinter Review |
3.02 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8356754 -
Flags: review?(jgilbert)
Assignee | ||
Comment 2•11 years ago
|
||
This is only used when testing the basic compositor on Mac (which is never the default and probably not going to be), and we only draw at most 7 quads per frame in this mode (BasicCompositor window surface, titlebar overlay, resizer, 4 corner masks), so it's not going to matter performance-wise. I'm still attaching it here in case we want it at some point anyway.
Comment 3•11 years ago
|
||
Comment on attachment 8356754 [details] [diff] [review]
CompositorOGL
Review of attachment 8356754 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/opengl/CompositorOGL.cpp
@@ +528,5 @@
>
> + mGLContext->fGenBuffers(1, &mQuadElements);
> + mGLContext->fBindBuffer(LOCAL_GL_ELEMENT_ARRAY_BUFFER, mQuadElements);
> + unsigned char indices[] = { 0, 1, 2, 3 };
> + mGLContext->fBufferData(LOCAL_GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, LOCAL_GL_STATIC_DRAW);
This shouldn't be any faster. DrawElements has additional overhead compared to DrawArrays, but is more efficient when you're reusing vertices, or need to change the drawing order.
Attachment #8356754 -
Flags: review?(jgilbert) → review-
Assignee | ||
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•