Closed Bug 904330 Opened 11 years ago Closed 11 years ago

GLContext extension (group) queries renaming

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: guillaume.abadie, Assigned: guillaume.abadie)

References

Details

Attachments

(5 files)

Switch IsExtensionSupported(ARB_draw_buffers) by: IsSupported(GLExtension::ARB_draw_buffers) And IsExtensionSupported(XXX_draw_buffers) by: IsSupported(GLFeature::draw_buffers)
(In reply to Guillaume Abadie from comment #0) > Switch > IsExtensionSupported(ARB_draw_buffers) > by: > IsSupported(GLExtension::ARB_draw_buffers) I don't see any reason to change IsExtensionSupported. Testing extensions and testing features are different things, we don't need to have them using the same interface.
(In reply to Jeff Muizelaar [:jrmuizel] from comment #1) > (In reply to Guillaume Abadie from comment #0) > > Switch > > IsExtensionSupported(ARB_draw_buffers) > > by: > > IsSupported(GLExtension::ARB_draw_buffers) > > I don't see any reason to change IsExtensionSupported. Testing extensions > and testing features are different things, we don't need to have them using > the same interface. That was just a subjection from jgilbert to have similar mechanism for Extension a Features. But I can just do the second one, I don't really mind. The only thing is we should leave the gl namespace, because the mozilla::gl::GLContext is redundant. So the enumeration for features will directly be mozilla::GLFeature::foo_bar.
Blocks: 905161
Attachment #792271 - Flags: review?(jgilbert)
Attachment #792273 - Flags: review?(jgilbert)
Comment on attachment 792271 [details] [diff] [review] patch step 1 - revision 1: Add mozilla::GLFeature Review of attachment 792271 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/gl/GLContext.h @@ +86,5 @@ > +/** GLFeature::Enum > + * We don't use typed enum to keep the implicit integer conversion. > + * This enum should be sorted by name. > + */ > +namespace GLFeature { This is better as mozilla::gl::Feature, or possibly GLContext::Feature. I think I like GLContext::Feature best. @@ +561,5 @@ > + > +// ----------------------------------------------------------------------------- > +// Feature queries > +/* > + * This mecahnism introduces a new way to check if a OpenGL feature is 'mechanism' @@ +562,5 @@ > +// ----------------------------------------------------------------------------- > +// Feature queries > +/* > + * This mecahnism introduces a new way to check if a OpenGL feature is > + * supported, regardless if it is supported by an extension or natively by s/if/of whether/ ::: gfx/gl/GLContextExtensionGroupQueries.cpp @@ +284,3 @@ > > + MOZ_ASSERT(feature < GLFeature::EnumMax, > + "GLContext::GetFeatureInfoInfo : unknown <extensionGroup>"); s/extensionGroup/feature/ @@ +311,2 @@ > > return profileVersion && version >= profileVersion; Note that if `profileVersion` is zero, it means that no version of the profile added support for the feature. (Or rather, that the feature is was never added to any version of the profile requested)
Attachment #792271 - Flags: review?(jgilbert) → review+
Attachment #792273 - Flags: review?(jgilbert) → review+
Attachment #792274 - Flags: review?(jgilbert) → review+
Attachment #792275 - Flags: review?(jgilbert) → review+
Attachment #792291 - Flags: review?(jgilbert) → review+
(In reply to Jeff Gilbert [:jgilbert] from comment #8) > Comment on attachment 792271 [details] [diff] [review] > patch step 1 - revision 1: Add mozilla::GLFeature > > Review of attachment 792271 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: gfx/gl/GLContext.h > @@ +86,5 @@ > > +/** GLFeature::Enum > > + * We don't use typed enum to keep the implicit integer conversion. > > + * This enum should be sorted by name. > > + */ > > +namespace GLFeature { > > This is better as mozilla::gl::Feature, or possibly GLContext::Feature. I > think I like GLContext::Feature best. mozilla::gl::Feature is not verygood, because with a using namespace we would have collisions. GLContext::Feature is maybe not good either, because that would mean that the code have to be in GLContext.h, where like this, the enumeration can be move into a separated .h. I'm going to put back GLFeature in mozilla::gl. > > @@ +561,5 @@ > > + > > +// ----------------------------------------------------------------------------- > > +// Feature queries > > +/* > > + * This mecahnism introduces a new way to check if a OpenGL feature is > > 'mechanism' Oups... > > @@ +562,5 @@ > > +// ----------------------------------------------------------------------------- > > +// Feature queries > > +/* > > + * This mecahnism introduces a new way to check if a OpenGL feature is > > + * supported, regardless if it is supported by an extension or natively by > > s/if/of whether/ fixed! > > ::: gfx/gl/GLContextExtensionGroupQueries.cpp > @@ +284,3 @@ > > > > + MOZ_ASSERT(feature < GLFeature::EnumMax, > > + "GLContext::GetFeatureInfoInfo : unknown <extensionGroup>"); > > s/extensionGroup/feature/ Oups... > > @@ +311,2 @@ > > > > return profileVersion && version >= profileVersion; > > Note that if `profileVersion` is zero, it means that no version of the > profile added support for the feature. (Or rather, that the feature is was > never added to any version of the profile requested) Ok!
Blocks: 908841
Depends on: 908449
Can we back this patch out? this bug has caused a regression in bug 908449, which is a b2g smoketest blocker on master/mozilla-central.
Flags: needinfo?(ryanvm)
(In reply to Tony Chung [:tchung] from comment #12) > Can we back this patch out? this bug has caused a regression in bug > 908449, which is a b2g smoketest blocker on master/mozilla-central. Which one? This would need backout many WebGL 2 patches... And as I see, we are not sure this patch has caused the problem. Cauted from bug 908449: > Talked with jgilbert - he thinks bug 904330 is probably the root cause.
(In reply to Tony Chung [:tchung] from comment #12) > Can we back this patch out? this bug has caused a regression in bug > 908449, which is a b2g smoketest blocker on master/mozilla-central. No. Let's just fix the regression instead. As Guillaume says, a large number of dependencies on this bug has already landed. The churn would be more dangerous than just spot-fixing.
Flags: needinfo?(ryanvm)
No longer depends on: 908449
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: