tests: remove XglDevice::CreateImage()
Direct allocation of XglImage should be enough.
diff --git a/tests/xgldevice.cpp b/tests/xgldevice.cpp
index 21ad179..bbd144e 100644
--- a/tests/xgldevice.cpp
+++ b/tests/xgldevice.cpp
@@ -17,15 +17,3 @@
ASSERT_NE(true, graphics_queues().empty());
m_queue = graphics_queues()[0]->obj();
}
-
-void XglDevice::CreateImage(XGL_UINT32 w, XGL_UINT32 h,
- XGL_FORMAT fmt, XGL_FLAGS usage,
- XglImage **pImage)
-{
- XglImage *new_image;
-
- new_image = new XglImage(this);
- new_image->init(w, h, fmt, usage);
-
- *pImage = new_image;
-}
diff --git a/tests/xgldevice.h b/tests/xgldevice.h
index eefaeaf..12f17fe 100644
--- a/tests/xgldevice.h
+++ b/tests/xgldevice.h
@@ -13,10 +13,6 @@
XGL_DEVICE device() { return obj(); }
void get_device_queue();
- void CreateImage(XGL_UINT32 w, XGL_UINT32 h,
- XGL_FORMAT fmt, XGL_FLAGS usage,
- XglImage **pImage);
-
XGL_UINT id;
XGL_PHYSICAL_GPU_PROPERTIES props;
const XGL_PHYSICAL_GPU_QUEUE_PROPERTIES *queue_props;
diff --git a/tests/xglrenderframework.cpp b/tests/xglrenderframework.cpp
index ab1fd0f..f0b5eb9 100644
--- a/tests/xglrenderframework.cpp
+++ b/tests/xglrenderframework.cpp
@@ -174,10 +174,11 @@
XGL_UINT i;
for (i = 0; i < m_renderTargetCount; i++) {
- m_device->CreateImage(m_width, m_height, m_render_target_fmt,
- XGL_IMAGE_USAGE_SHADER_ACCESS_WRITE_BIT |
- XGL_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
- &m_renderTargets[i]);
+ XglImage *img = new XglImage(m_device);
+ img->init(m_width, m_height, m_render_target_fmt,
+ XGL_IMAGE_USAGE_SHADER_ACCESS_WRITE_BIT |
+ XGL_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
+ m_renderTargets[i] = img;
}
}