mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=797568 destroy GLXPixmap on Finish r=roc
--HG-- extra : transplant_source : 5%969%9A%B7%97%B2%EC%15%CA%7FPSWP%26Y%9DS%AE
This commit is contained in:
parent
9c4ac49947
commit
46e02a3103
@ -214,6 +214,18 @@ gfxXlibSurface::CreateSimilarSurface(gfxContentType aContent,
|
||||
return gfxASurface::CreateSimilarSurface(aContent, aSize);
|
||||
}
|
||||
|
||||
void
|
||||
gfxXlibSurface::Finish()
|
||||
{
|
||||
#if !defined(MOZ_PLATFORM_MAEMO)
|
||||
if (mGLXPixmap) {
|
||||
gl::sDefGLXLib.DestroyPixmap(mGLXPixmap);
|
||||
mGLXPixmap = None;
|
||||
}
|
||||
#endif
|
||||
gfxASurface::Finish();
|
||||
}
|
||||
|
||||
void
|
||||
gfxXlibSurface::DoSizeQuery()
|
||||
{
|
||||
@ -511,6 +523,14 @@ GLXPixmap
|
||||
gfxXlibSurface::GetGLXPixmap()
|
||||
{
|
||||
if (!mGLXPixmap) {
|
||||
#ifdef DEBUG
|
||||
// cairo_surface_has_show_text_glyphs is used solely for the
|
||||
// side-effect of setting the error on surface if
|
||||
// cairo_surface_finish() has been called.
|
||||
cairo_surface_has_show_text_glyphs(CairoSurface());
|
||||
NS_ASSERTION(CairoStatus() != CAIRO_STATUS_SURFACE_FINISHED,
|
||||
"GetGLXPixmap called after surface finished");
|
||||
#endif
|
||||
mGLXPixmap = gl::sDefGLXLib.CreatePixmap(this);
|
||||
}
|
||||
return mGLXPixmap;
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
|
||||
virtual already_AddRefed<gfxASurface>
|
||||
CreateSimilarSurface(gfxContentType aType, const gfxIntSize& aSize);
|
||||
virtual void Finish() MOZ_OVERRIDE;
|
||||
|
||||
virtual const gfxIntSize GetSize() const { return mSize; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user