Closed
Bug 744543
Opened 13 years ago
Closed 13 years ago
LayerManagerOGL doesn't build on Linux/clang
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: gw280, Assigned: gw280)
References
Details
Attachments
(1 file)
(deleted),
patch
|
bjacob
:
review+
|
Details | Diff | Splinter Review |
We get this compile error:
/home/george/dev/mozilla-central/gfx/layers/opengl/LayerManagerOGL.cpp:265:7: error:
non-constant-expression cannot be narrowed from type 'int' to 'GLenum' (aka 'unsigned
int') in initializer list mGLContext->IsGLES2() ? LOCAL_GL_TEXTURE_RECTANGLE_ARB : 0
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #614115 -
Flags: review?(bjacob)
Comment 2•13 years ago
|
||
Comment on attachment 614115 [details] [diff] [review]
Bug 744543 - LayerManagerOGL doesn't build on Linux/clang. r=?
Review of attachment 614115 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/opengl/LayerManagerOGL.cpp
@@ +266,5 @@
> };
>
> + if (mGLContext->IsGLES2()) {
> + textureTargets[1] = LOCAL_GL_TEXTURE_RECTANGLE_ARB;
> + }
No need for braces, per coding style. They uselessly reduce risk of future bugs, which is an unfair advantage given to future developers over us.
Attachment #614115 -
Flags: review?(bjacob) → review+
Comment 3•13 years ago
|
||
(In reply to Benoit Jacob [:bjacob] from comment #2)
> Comment on attachment 614115 [details] [diff] [review]
> Bug 744543 - LayerManagerOGL doesn't build on Linux/clang. r=?
>
> Review of attachment 614115 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: gfx/layers/opengl/LayerManagerOGL.cpp
> @@ +266,5 @@
> > };
> >
> > + if (mGLContext->IsGLES2()) {
> > + textureTargets[1] = LOCAL_GL_TEXTURE_RECTANGLE_ARB;
> > + }
>
> No need for braces, per coding style. They uselessly reduce risk of future
> bugs, which is an unfair advantage given to future developers over us.
The coding style disagrees, and wants braces.
Assignee | ||
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
(In reply to Ms2ger from comment #3)
> The coding style disagrees, and wants braces.
Indeed. But on the other hand, the MFBT coding style (mfbt/STYLE) doesn't want braces here. We need to harmonize this a bit...
Updated•13 years ago
|
Blocks: clang-macosx
Comment 6•13 years ago
|
||
Comment on attachment 614115 [details] [diff] [review]
Bug 744543 - LayerManagerOGL doesn't build on Linux/clang. r=?
Review of attachment 614115 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/opengl/LayerManagerOGL.cpp
@@ +266,4 @@
> };
>
> + if (mGLContext->IsGLES2()) {
> + textureTargets[1] = LOCAL_GL_TEXTURE_RECTANGLE_ARB;
4-space indent in 2-space land.
@@ +273,5 @@
>
> for (PRUint32 i = 0; i < ArrayLength(textureTargets); i++) {
> GLenum target = textureTargets[i];
> if (!target)
> continue;
If you don't mind fixing it, this should also be 2-space.
Comment 7•13 years ago
|
||
Alas, I am too late, as you already hit inbound with it.
Updated•13 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla14
Comment 8•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•