Pass gl::Context to impl methods instead of ContextImpl.
In some cases we might have to call back into the GL layer, passing
the Context, and if we just have a ContextImpl pointer this isn't
possible. It also removes the need for SafeGetImpl.
BUG=angleproject:2044
Change-Id: I6363e84b25648c992c25779d4c43f795aa2866d6
Reviewed-on: https://chromium-review.googlesource.com/516835
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/TextureVk.cpp b/src/libANGLE/renderer/vulkan/TextureVk.cpp
index 7c3bf4b..16d7bb4 100644
--- a/src/libANGLE/renderer/vulkan/TextureVk.cpp
+++ b/src/libANGLE/renderer/vulkan/TextureVk.cpp
@@ -22,7 +22,7 @@
{
}
-gl::Error TextureVk::setImage(ContextImpl *contextImpl,
+gl::Error TextureVk::setImage(const gl::Context *context,
GLenum target,
size_t level,
GLenum internalFormat,
@@ -36,7 +36,7 @@
return gl::Error(GL_INVALID_OPERATION);
}
-gl::Error TextureVk::setSubImage(ContextImpl *contextImpl,
+gl::Error TextureVk::setSubImage(const gl::Context *context,
GLenum target,
size_t level,
const gl::Box &area,
@@ -49,7 +49,7 @@
return gl::Error(GL_INVALID_OPERATION);
}
-gl::Error TextureVk::setCompressedImage(ContextImpl *contextImpl,
+gl::Error TextureVk::setCompressedImage(const gl::Context *context,
GLenum target,
size_t level,
GLenum internalFormat,
@@ -62,7 +62,7 @@
return gl::Error(GL_INVALID_OPERATION);
}
-gl::Error TextureVk::setCompressedSubImage(ContextImpl *contextImpl,
+gl::Error TextureVk::setCompressedSubImage(const gl::Context *context,
GLenum target,
size_t level,
const gl::Box &area,
@@ -75,7 +75,7 @@
return gl::Error(GL_INVALID_OPERATION);
}
-gl::Error TextureVk::copyImage(ContextImpl *contextImpl,
+gl::Error TextureVk::copyImage(const gl::Context *context,
GLenum target,
size_t level,
const gl::Rectangle &sourceArea,
@@ -86,7 +86,7 @@
return gl::Error(GL_INVALID_OPERATION);
}
-gl::Error TextureVk::copySubImage(ContextImpl *contextImpl,
+gl::Error TextureVk::copySubImage(const gl::Context *context,
GLenum target,
size_t level,
const gl::Offset &destOffset,
@@ -97,7 +97,7 @@
return gl::Error(GL_INVALID_OPERATION);
}
-gl::Error TextureVk::setStorage(ContextImpl *contextImpl,
+gl::Error TextureVk::setStorage(const gl::Context *context,
GLenum target,
size_t levels,
GLenum internalFormat,
@@ -121,7 +121,7 @@
return gl::Error(GL_INVALID_OPERATION);
}
-gl::Error TextureVk::generateMipmap(ContextImpl *contextImpl)
+gl::Error TextureVk::generateMipmap(const gl::Context *context)
{
UNIMPLEMENTED();
return gl::Error(GL_INVALID_OPERATION);
@@ -155,7 +155,7 @@
UNIMPLEMENTED();
}
-gl::Error TextureVk::setStorageMultisample(ContextImpl *contextImpl,
+gl::Error TextureVk::setStorageMultisample(const gl::Context *context,
GLenum target,
GLsizei samples,
GLint internalformat,