Commit f99b0cff by Jamie Madill

Remove getNativeTexture from TextureImpl.

We can stop exposing this method on the GL-side, now that we only use it on the D3D back-end. BUG=angle:781 Change-Id: I3a9ecc277dcd21147881b8780849782f68b3e62e Reviewed-on: https://chromium-review.googlesource.com/222924Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarBrandon Jones <bajones@chromium.org>
parent dd3bf52e
...@@ -131,11 +131,6 @@ GLenum Texture::getActualFormat(const ImageIndex &index) const ...@@ -131,11 +131,6 @@ GLenum Texture::getActualFormat(const ImageIndex &index) const
return image->getActualFormat(); return image->getActualFormat();
} }
rx::TextureStorage *Texture::getNativeTexture()
{
return getImplementation()->getNativeTexture();
}
void Texture::generateMipmaps() void Texture::generateMipmaps()
{ {
getImplementation()->generateMipmaps(); getImplementation()->generateMipmaps();
......
...@@ -68,8 +68,6 @@ class Texture : public RefCountObject ...@@ -68,8 +68,6 @@ class Texture : public RefCountObject
virtual bool isSamplerComplete(const SamplerState &samplerState, const TextureCapsMap &textureCaps, const Extensions &extensions, int clientVersion) const = 0; virtual bool isSamplerComplete(const SamplerState &samplerState, const TextureCapsMap &textureCaps, const Extensions &extensions, int clientVersion) const = 0;
rx::TextureStorage *getNativeTexture();
virtual void generateMipmaps(); virtual void generateMipmaps();
virtual Error copySubImage(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height, Framebuffer *source); virtual Error copySubImage(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height, Framebuffer *source);
......
...@@ -40,11 +40,6 @@ class TextureImpl ...@@ -40,11 +40,6 @@ class TextureImpl
public: public:
virtual ~TextureImpl() {}; virtual ~TextureImpl() {};
// TODO: If this methods could go away that would be ideal;
// TextureStorage should only be necessary for the D3D backend, and as such
// higher level code should not rely on it.
virtual TextureStorage *getNativeTexture() = 0;
// Deprecated in favour of the ImageIndex method // Deprecated in favour of the ImageIndex method
virtual Image *getImage(int level, int layer) const = 0; virtual Image *getImage(int level, int layer) const = 0;
virtual Image *getImage(const gl::ImageIndex &index) const = 0; virtual Image *getImage(const gl::ImageIndex &index) const = 0;
......
...@@ -35,7 +35,7 @@ class TextureD3D : public TextureImpl ...@@ -35,7 +35,7 @@ class TextureD3D : public TextureImpl
static TextureD3D *makeTextureD3D(TextureImpl *texture); static TextureD3D *makeTextureD3D(TextureImpl *texture);
virtual TextureStorage *getNativeTexture(); TextureStorage *getNativeTexture();
virtual void setUsage(GLenum usage) { mUsage = usage; } virtual void setUsage(GLenum usage) { mUsage = usage; }
bool hasDirtyImages() const { return mDirtyImages; } bool hasDirtyImages() const { return mDirtyImages; }
......
...@@ -464,11 +464,13 @@ gl::Error Renderer11::generateSwizzle(gl::Texture *texture) ...@@ -464,11 +464,13 @@ gl::Error Renderer11::generateSwizzle(gl::Texture *texture)
{ {
if (texture) if (texture)
{ {
TextureStorage *texStorage = texture->getNativeTexture(); TextureD3D *textureD3D = TextureD3D::makeTextureD3D(texture->getImplementation());
ASSERT(textureD3D);
TextureStorage *texStorage = textureD3D->getNativeTexture();
if (texStorage) if (texStorage)
{ {
TextureStorage11 *storage11 = TextureStorage11::makeTextureStorage11(texStorage); TextureStorage11 *storage11 = TextureStorage11::makeTextureStorage11(texStorage);
gl::Error error = storage11->generateSwizzles(texture->getSamplerState().swizzleRed, gl::Error error = storage11->generateSwizzles(texture->getSamplerState().swizzleRed,
texture->getSamplerState().swizzleGreen, texture->getSamplerState().swizzleGreen,
texture->getSamplerState().swizzleBlue, texture->getSamplerState().swizzleBlue,
...@@ -3128,7 +3130,8 @@ void Renderer11::invalidateFBOAttachmentSwizzles(gl::FramebufferAttachment *atta ...@@ -3128,7 +3130,8 @@ void Renderer11::invalidateFBOAttachmentSwizzles(gl::FramebufferAttachment *atta
ASSERT(attachment->isTexture()); ASSERT(attachment->isTexture());
gl::Texture *texture = attachment->getTexture(); gl::Texture *texture = attachment->getTexture();
TextureStorage *texStorage = texture->getNativeTexture(); TextureD3D *textureD3D = TextureD3D::makeTextureD3D(texture->getImplementation());
TextureStorage *texStorage = textureD3D->getNativeTexture();
if (texStorage) if (texStorage)
{ {
TextureStorage11 *texStorage11 = TextureStorage11::makeTextureStorage11(texStorage); TextureStorage11 *texStorage11 = TextureStorage11::makeTextureStorage11(texStorage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment