aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2016-11-18 14:02:59 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2016-11-18 13:14:25 +0000
commit584c90df98891d5ab7d62ef09f63986ab91dfc6b (patch)
treeb381761f17bde9d2cfc8aecd14e4ab65fa510944
parentfccbc89125852f9d8679f7ae8d201a67619f6066 (diff)
QSGRendererInterface: Add Resource suffix for consistency
Change-Id: I60e674760725d4c4dd13f53b31c3abb6b09c1790 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--examples/quick/scenegraph/rendernode/d3d12renderer.cpp5
-rw-r--r--examples/quick/scenegraph/rendernode/softwarerenderer.cpp2
-rw-r--r--src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp6
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp2
-rw-r--r--src/quick/scenegraph/coreapi/qsgrendererinterface.cpp8
-rw-r--r--src/quick/scenegraph/coreapi/qsgrendererinterface.h8
6 files changed, 16 insertions, 15 deletions
diff --git a/examples/quick/scenegraph/rendernode/d3d12renderer.cpp b/examples/quick/scenegraph/rendernode/d3d12renderer.cpp
index 3b377f1cb1..72ebfe869e 100644
--- a/examples/quick/scenegraph/rendernode/d3d12renderer.cpp
+++ b/examples/quick/scenegraph/rendernode/d3d12renderer.cpp
@@ -78,7 +78,7 @@ void D3D12RenderNode::releaseResources()
void D3D12RenderNode::init()
{
QSGRendererInterface *rif = m_item->window()->rendererInterface();
- m_device = static_cast<ID3D12Device *>(rif->getResource(m_item->window(), QSGRendererInterface::Device));
+ m_device = static_cast<ID3D12Device *>(rif->getResource(m_item->window(), QSGRendererInterface::DeviceResource));
Q_ASSERT(m_device);
D3D12_ROOT_PARAMETER rootParameter;
@@ -235,7 +235,8 @@ void D3D12RenderNode::render(const RenderState *state)
init();
QSGRendererInterface *rif = m_item->window()->rendererInterface();
- ID3D12GraphicsCommandList *commandList = static_cast<ID3D12GraphicsCommandList *>(rif->getResource(m_item->window(), QSGRendererInterface::CommandList));
+ ID3D12GraphicsCommandList *commandList = static_cast<ID3D12GraphicsCommandList *>(
+ rif->getResource(m_item->window(), QSGRendererInterface::CommandListResource));
Q_ASSERT(commandList);
const int msize = 16 * sizeof(float);
diff --git a/examples/quick/scenegraph/rendernode/softwarerenderer.cpp b/examples/quick/scenegraph/rendernode/softwarerenderer.cpp
index 06e406874a..d303b9ef13 100644
--- a/examples/quick/scenegraph/rendernode/softwarerenderer.cpp
+++ b/examples/quick/scenegraph/rendernode/softwarerenderer.cpp
@@ -61,7 +61,7 @@ void SoftwareRenderNode::releaseResources()
void SoftwareRenderNode::render(const RenderState *renderState)
{
QSGRendererInterface *rif = m_item->window()->rendererInterface();
- QPainter *p = static_cast<QPainter *>(rif->getResource(m_item->window(), QSGRendererInterface::Painter));
+ QPainter *p = static_cast<QPainter *>(rif->getResource(m_item->window(), QSGRendererInterface::PainterResource));
Q_ASSERT(p);
p->setTransform(matrix()->toTransform());
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp
index a318ce23f7..44f79ebea7 100644
--- a/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp
+++ b/src/plugins/scenegraph/d3d12/qsgd3d12engine.cpp
@@ -3236,11 +3236,11 @@ void QSGD3D12EnginePrivate::DeviceLossTester::killDevice()
void *QSGD3D12EnginePrivate::getResource(QSGRendererInterface::Resource resource) const
{
switch (resource) {
- case QSGRendererInterface::Device:
+ case QSGRendererInterface::DeviceResource:
return device;
- case QSGRendererInterface::CommandQueue:
+ case QSGRendererInterface::CommandQueueResource:
return commandQueue.Get();
- case QSGRendererInterface::CommandList:
+ case QSGRendererInterface::CommandListResource:
return commandList;
default:
break;
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp
index 05d5daa686..d71b0c3e2a 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp
@@ -215,7 +215,7 @@ QSGRendererInterface::ShaderSourceTypes QSGSoftwareContext::shaderSourceType() c
void *QSGSoftwareContext::getResource(QQuickWindow *window, Resource resource) const
{
- if (resource == Painter && window && window->isSceneGraphInitialized())
+ if (resource == PainterResource && window && window->isSceneGraphInitialized())
return static_cast<QSGSoftwareRenderContext *>(QQuickWindowPrivate::get(window)->context)->m_activePainter;
return nullptr;
diff --git a/src/quick/scenegraph/coreapi/qsgrendererinterface.cpp b/src/quick/scenegraph/coreapi/qsgrendererinterface.cpp
index fa543aecad..d309044e8f 100644
--- a/src/quick/scenegraph/coreapi/qsgrendererinterface.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrendererinterface.cpp
@@ -81,10 +81,10 @@ QT_BEGIN_NAMESPACE
/*!
\enum QSGRendererInterface::Resource
- \value Device The graphics device, when applicable.
- \value CommandQueue The graphics command queue used by the scenegraph, when applicable.
- \value CommandList The command list or buffer used by the scenegraph, when applicable.
- \value Painter The active QPainter used by the scenegraph, when running with the software backend.
+ \value DeviceResource The graphics device, when applicable.
+ \value CommandQueueResource The graphics command queue used by the scenegraph, when applicable.
+ \value CommandListResource The command list or buffer used by the scenegraph, when applicable.
+ \value PainterResource The active QPainter used by the scenegraph, when running with the software backend.
*/
/*!
diff --git a/src/quick/scenegraph/coreapi/qsgrendererinterface.h b/src/quick/scenegraph/coreapi/qsgrendererinterface.h
index a50b362aeb..cf8fcf9015 100644
--- a/src/quick/scenegraph/coreapi/qsgrendererinterface.h
+++ b/src/quick/scenegraph/coreapi/qsgrendererinterface.h
@@ -57,10 +57,10 @@ public:
};
enum Resource {
- Device,
- CommandQueue,
- CommandList,
- Painter
+ DeviceResource,
+ CommandQueueResource,
+ CommandListResource,
+ PainterResource
};
enum ShaderType {