Closed Bug 976813 Opened 10 years ago Closed 10 years ago

Separate ShSurf::Texture() for Producer and Consumer

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

(Whiteboard: webgl-internal)

Attachments

(1 file, 2 obsolete files)

Right now, the Texture is always accessed via ShSurf::Texture(). This has caused a bug where we don't actually use IOSurfaces properly.
Attached patch mac-io-surf (obsolete) — Splinter Review
Attachment #8381746 - Flags: review?(snorp)
Blocks: 976815
Depends on: 976817
Comment on attachment 8381746 [details] [diff] [review]
mac-io-surf

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

::: gfx/gl/GLContext.h
@@ +2678,5 @@
>      ScopedDeletePtr<GLBlitTextureImageHelper> mBlitTextureImageHelper;
>      ScopedDeletePtr<GLReadTexImageHelper> mReadTexImageHelper;
>  
>  public:
> +    ScopedDeletePtr<GLBlitHelper> mBlitHelper;

Unintentional change?
Attachment #8381746 - Flags: review?(snorp) → review+
Blocks: 980684
Attached patch lock-tex (obsolete) — Splinter Review
These patches were sort of going with the wrong bugs.
Attachment #8381746 - Attachment is obsolete: true
Attachment #8387273 - Flags: review?(snorp)
Whiteboard: webgl-internal
Comment on attachment 8387273 [details] [diff] [review]
lock-tex

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

Looks good, though I don't really get moving that stuff from SharedSurface into SharedSurface_GL and using that everywhere

::: gfx/gl/GLContext.cpp
@@ +1560,5 @@
>  
>      return true;
>  }
>  
> +SharedSurface_GL*

So why do we have SharedSurface at all now?

::: gfx/gl/SharedSurfaceEGL.cpp
@@ +107,5 @@
>      }
>  }
>  
> +GLuint
> +SharedSurface_EGLImage::ProdTexture()

can probably stick trivial stuff like this in the header
Attachment #8387273 - Flags: review?(snorp) → review+
Comment on attachment 8387273 [details] [diff] [review]
lock-tex

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

::: gfx/gl/SharedSurfaceGL.h
@@ +68,5 @@
> +        MOZ_ASSERT(AttachType() == AttachmentType::GLTexture);
> +        MOZ_CRASH("Did you forget to override this function?");
> +    }
> +
> +    virtual GLenum TextureTarget() const {

Maybe this should be ProdTextureTarget(). We do have some places now where this differs between prod/cons...
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #4)
> Comment on attachment 8387273 [details] [diff] [review]
> lock-tex
> 
> Review of attachment 8387273 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Looks good, though I don't really get moving that stuff from SharedSurface
> into SharedSurface_GL and using that everywhere
> 
> ::: gfx/gl/GLContext.cpp
> @@ +1560,5 @@
> >  
> >      return true;
> >  }
> >  
> > +SharedSurface_GL*
> 
> So why do we have SharedSurface at all now?
Originally it was supposed to be a base class that could support CPU-only resources. Since this isn't really needed for WebGL, it was never developed. I suppose we can remove it, since MozSurface is going to be the future, anyways.
> 
> ::: gfx/gl/SharedSurfaceEGL.cpp
> @@ +107,5 @@
> >      }
> >  }
> >  
> > +GLuint
> > +SharedSurface_EGLImage::ProdTexture()
> 
> can probably stick trivial stuff like this in the header
Attached patch patchSplinter Review
Added ProTextureTarget.
Attachment #8387273 - Attachment is obsolete: true
Attachment #8388009 - Flags: review?(snorp)
No longer depends on: 976817
Attachment #8388009 - Flags: review?(snorp) → review+
https://hg.mozilla.org/mozilla-central/rev/d6e7ed4cd0a6
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: