mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1187464 - Part 2. RTTI for TextureSource debug purposes. Carry r=botond
This commit is contained in:
parent
b3751673dd
commit
0be7c2a9ed
@ -34,6 +34,7 @@ class DataTextureSourceBasic : public DataTextureSource
|
||||
, public TextureSourceBasic
|
||||
{
|
||||
public:
|
||||
virtual const char* Name() const override { return "DataTextureSourceBasic"; }
|
||||
|
||||
virtual TextureSourceBasic* AsSourceBasic() override { return this; }
|
||||
|
||||
@ -451,7 +452,7 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect,
|
||||
DrawOptions(aOpacity, blendMode),
|
||||
sourceMask, &maskTransform);
|
||||
} else {
|
||||
gfxDevCrash(LogReason::IncompatibleBasicTexturedEffect) << "Bad for basic";
|
||||
gfxDevCrash(LogReason::IncompatibleBasicTexturedEffect) << "Bad for basic with " << texturedEffect->mTexture->Name();
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -23,6 +23,8 @@ public:
|
||||
, mSize(aRect.Size())
|
||||
{ }
|
||||
|
||||
virtual const char* Name() const override { return "BasicCompositingRenderTarget"; }
|
||||
|
||||
virtual gfx::IntSize GetSize() const override { return mSize; }
|
||||
|
||||
void BindRenderTarget();
|
||||
|
@ -31,6 +31,8 @@ public:
|
||||
MacIOSurface* aSurface);
|
||||
virtual ~MacIOSurfaceTextureSourceBasic();
|
||||
|
||||
virtual const char* Name() const override { return "MacIOSurfaceTextureSourceBasic"; }
|
||||
|
||||
virtual TextureSourceBasic* AsSourceBasic() override { return this; }
|
||||
|
||||
virtual gfx::IntSize GetSize() const override;
|
||||
|
@ -22,6 +22,8 @@ class X11DataTextureSourceBasic : public DataTextureSource
|
||||
public:
|
||||
X11DataTextureSourceBasic() {};
|
||||
|
||||
virtual const char* Name() const override { return "X11DataTextureSourceBasic"; }
|
||||
|
||||
virtual bool Update(gfx::DataSourceSurface* aSurface,
|
||||
nsIntRegion* aDestRegion = nullptr,
|
||||
gfx::IntPoint* aSrcOffset = nullptr) override;
|
||||
|
@ -24,6 +24,8 @@ class X11TextureSourceBasic
|
||||
public:
|
||||
X11TextureSourceBasic(BasicCompositor* aCompositor, gfxXlibSurface* aSurface);
|
||||
|
||||
virtual const char* Name() const override { return "X11TextureSourceBasic"; }
|
||||
|
||||
virtual X11TextureSourceBasic* AsSourceBasic() override { return this; }
|
||||
|
||||
virtual gfx::IntSize GetSize() const override;
|
||||
|
@ -374,6 +374,13 @@ TextureSource::~TextureSource()
|
||||
MOZ_COUNT_DTOR(TextureSource);
|
||||
}
|
||||
|
||||
const char*
|
||||
TextureSource::Name() const
|
||||
{
|
||||
MOZ_CRASH("TextureSource without class name");
|
||||
return "TextureSource";
|
||||
}
|
||||
|
||||
BufferTextureHost::BufferTextureHost(const BufferDescriptor& aDesc,
|
||||
TextureFlags aFlags)
|
||||
: TextureHost(aFlags)
|
||||
|
@ -88,6 +88,8 @@ public:
|
||||
|
||||
virtual ~TextureSource();
|
||||
|
||||
virtual const char* Name() const = 0;
|
||||
|
||||
/**
|
||||
* Should be overridden in order to deallocate the data that is associated
|
||||
* with the rendering backend, such as GL textures.
|
||||
@ -233,6 +235,8 @@ public:
|
||||
: mUpdateSerial(0)
|
||||
{}
|
||||
|
||||
virtual const char* Name() const override { return "DataTextureSource"; }
|
||||
|
||||
virtual DataTextureSource* AsDataTextureSource() override { return this; }
|
||||
|
||||
/**
|
||||
@ -724,6 +728,8 @@ public:
|
||||
{}
|
||||
virtual ~CompositingRenderTarget() {}
|
||||
|
||||
virtual const char* Name() const override { return "CompositingRenderTarget"; }
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual already_AddRefed<gfx::DataSourceSurface> Dump(Compositor* aCompositor) { return nullptr; }
|
||||
#endif
|
||||
|
@ -21,6 +21,8 @@ public:
|
||||
// Called when the underlying X surface has been changed.
|
||||
// Useful for determining whether to rebind a GLXPixmap to a texture.
|
||||
virtual void Updated() = 0;
|
||||
|
||||
virtual const char* Name() const override { return "X11TextureSource"; }
|
||||
};
|
||||
|
||||
// TextureHost for Xlib-backed TextureSources.
|
||||
|
@ -214,6 +214,7 @@ public:
|
||||
|
||||
virtual ~DataTextureSourceD3D11();
|
||||
|
||||
virtual const char* Name() const override { return "DataTextureSourceD3D11"; }
|
||||
|
||||
// DataTextureSource
|
||||
|
||||
@ -369,6 +370,8 @@ public:
|
||||
const gfx::IntPoint& aOrigin,
|
||||
DXGI_FORMAT aFormatOverride = DXGI_FORMAT_UNKNOWN);
|
||||
|
||||
virtual const char* Name() const override { return "CompositingRenderTargetD3D11"; }
|
||||
|
||||
virtual TextureSourceD3D11* AsSourceD3D11() override { return this; }
|
||||
|
||||
void BindRenderTarget(ID3D11DeviceContext* aContext);
|
||||
|
@ -112,6 +112,8 @@ public:
|
||||
|
||||
virtual ~DataTextureSourceD3D9();
|
||||
|
||||
virtual const char* Name() const override { return "DataTextureSourceD3D9"; }
|
||||
|
||||
// DataTextureSource
|
||||
|
||||
virtual bool Update(gfx::DataSourceSurface* aSurface,
|
||||
@ -398,6 +400,8 @@ public:
|
||||
const gfx::IntRect& aRect);
|
||||
virtual ~CompositingRenderTargetD3D9();
|
||||
|
||||
virtual const char* Name() const override { return "CompositingRenderTargetD3D9"; }
|
||||
|
||||
virtual TextureSourceD3D9* AsSourceD3D9() override
|
||||
{
|
||||
MOZ_ASSERT(mTexture,
|
||||
|
@ -77,6 +77,8 @@ public:
|
||||
|
||||
~CompositingRenderTargetOGL();
|
||||
|
||||
virtual const char* Name() const override { return "CompositingRenderTargetOGL"; }
|
||||
|
||||
/**
|
||||
* Create a render target around the default FBO, for rendering straight to
|
||||
* the window.
|
||||
|
@ -28,6 +28,8 @@ public:
|
||||
MacIOSurface* aSurface);
|
||||
virtual ~MacIOSurfaceTextureSourceOGL();
|
||||
|
||||
virtual const char* Name() const override { return "MacIOSurfaceTextureSourceOGL"; }
|
||||
|
||||
virtual TextureSourceOGL* AsSourceOGL() override { return this; }
|
||||
|
||||
virtual void BindTexture(GLenum activetex, gfx::Filter aFilter) override;
|
||||
|
@ -142,6 +142,7 @@ public:
|
||||
, mIterating(false)
|
||||
{}
|
||||
|
||||
virtual const char* Name() const override { return "TextureImageTextureSourceOGL"; }
|
||||
// DataTextureSource
|
||||
|
||||
virtual bool Update(gfx::DataSourceSurface* aSurface,
|
||||
@ -237,6 +238,8 @@ public:
|
||||
|
||||
~GLTextureSource();
|
||||
|
||||
virtual const char* Name() const override { return "GLTextureSource"; }
|
||||
|
||||
virtual GLTextureSource* AsGLTextureSource() override { return this; }
|
||||
|
||||
virtual TextureSourceOGL* AsSourceOGL() override { return this; }
|
||||
@ -344,6 +347,8 @@ public:
|
||||
GLenum aWrapMode,
|
||||
gfx::IntSize aSize);
|
||||
|
||||
virtual const char* Name() const override { return "SurfaceTextureSource"; }
|
||||
|
||||
virtual TextureSourceOGL* AsSourceOGL() { return this; }
|
||||
|
||||
virtual void BindTexture(GLenum activetex, gfx::Filter aFilter) override;
|
||||
@ -436,6 +441,8 @@ public:
|
||||
GLenum aWrapMode,
|
||||
gfx::IntSize aSize);
|
||||
|
||||
virtual const char* Name() const override { return "EGLImageTextureSource"; }
|
||||
|
||||
virtual TextureSourceOGL* AsSourceOGL() override { return this; }
|
||||
|
||||
virtual void BindTexture(GLenum activetex, gfx::Filter aFilter) override;
|
||||
|
Loading…
Reference in New Issue
Block a user