Closed Bug 949814 Opened 6 years ago Closed 6 years ago

Remove GetEGLContext and GetLibraryEGL from GLContext

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: bjacob, Assigned: bjacob)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

Attached patch patchSplinter Review
No description provided.
Attachment #8346958 - Flags: review?(jgilbert)
Comment on attachment 8346958 [details] [diff] [review]
patch

Review of attachment 8346958 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/gl/SharedSurfaceEGL.cpp
@@ +133,5 @@
>      GLuint tex = CreateTextureForOffscreen(gl, formats, size);
>      if (!tex)
>          return false;
>  
> +    EGLContext context = (EGLContext) gl->GetNativeData(GLContext::NativeGLContext);

Wait, I thought we were getting rid of this? Surely GetNativeData is also on the chopping block from GLContext.
I definitely think that `GetEGLContext` is better (simpler) than `GetNativeData(NativeGLContext)`.
Attachment #8346958 - Flags: review?(jgilbert) → review-
Yes, I would like to get rid of GetNativeData too, but I don't prefer GetEGLContext over GetNativeData,  because GetEGLContext is EGL-specific and therefore doesn't fit in the generic GLContext class.

What I would like to happen, is for people to do e.g.

if (gl->ContextType() == GLContext::CONTEXT_TYPE_EGL) {
  static_cast<GLContextEGL*>(gl)->DoSomethingEGLSpecific();
}

In this way, the only context-type-specific stuff that we even need to have built into GLContext itself, is the ContextType enum.

Given that that's a nontrivial change (not huge,  but nontrivial), I would still like to first get to the intermediate step where we are rid of GetEGLContext and have only GetNativeData left to get rid of.
Alright, after talking with bjacob on IRC, what we want to do is remove all this backend-specific stuff from GLContext.

Bug 950903 for the full story and subsequent work.
Blocks: 950903
Attachment #8346958 - Flags: review- → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/cef4a72b8d55

I'm taking bug 950903, too.
Assignee: nobody → bjacob
Target Milestone: --- → mozilla29
https://hg.mozilla.org/mozilla-central/rev/cef4a72b8d55
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.