Remove GetEGLContext and GetLibraryEGL from GLContext

RESOLVED FIXED in mozilla29

Status

()

Core
Graphics
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: bjacob, Assigned: bjacob)

Tracking

Trunk
mozilla29
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

Created attachment 8346958 [details] [diff] [review]
patch
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-
(Assignee)

Comment 2

4 years ago
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+
(Assignee)

Comment 4

4 years ago
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
Last Resolved: 4 years ago
Resolution: --- → FIXED

Updated

4 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.