Accept ImageIndex in TextureD3D::subImage and getImage.
This paves the way for setting data on the TextureStorage directly
instead of working through the Image objects.
BUG=angle:741
Change-Id: I3be3d5f9b2e45707c1630b74ad3f4789e034c3fd
Reviewed-on: https://chromium-review.googlesource.com/218311
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libGLESv2/Texture.cpp b/src/libGLESv2/Texture.cpp
index 396dbb5..826002d 100644
--- a/src/libGLESv2/Texture.cpp
+++ b/src/libGLESv2/Texture.cpp
@@ -12,6 +12,7 @@
#include "libGLESv2/main.h"
#include "libGLESv2/Context.h"
#include "libGLESv2/formatutils.h"
+#include "libGLESv2/ImageIndex.h"
#include "libGLESv2/Renderbuffer.h"
#include "libGLESv2/renderer/Image.h"
#include "libGLESv2/renderer/d3d/TextureStorage.h"
@@ -115,25 +116,25 @@
GLsizei Texture::getWidth(const ImageIndex &index) const
{
- rx::Image *image = mTexture->getImage(index.mipIndex, index.layerIndex);
+ rx::Image *image = mTexture->getImage(index);
return image->getWidth();
}
GLsizei Texture::getHeight(const ImageIndex &index) const
{
- rx::Image *image = mTexture->getImage(index.mipIndex, index.layerIndex);
+ rx::Image *image = mTexture->getImage(index);
return image->getHeight();
}
GLenum Texture::getInternalFormat(const ImageIndex &index) const
{
- rx::Image *image = mTexture->getImage(index.mipIndex, index.layerIndex);
+ rx::Image *image = mTexture->getImage(index);
return image->getInternalFormat();
}
GLenum Texture::getActualFormat(const ImageIndex &index) const
{
- rx::Image *image = mTexture->getImage(index.mipIndex, index.layerIndex);
+ rx::Image *image = mTexture->getImage(index);
return image->getActualFormat();
}