scenes/opengl: Rename RenderContext::transforms to RenderContext::transformStack
It's a better name and it's consistent with opacityStack.
This commit is contained in:
parent
63a866d98c
commit
8cc5e04238
2 changed files with 8 additions and 8 deletions
|
@ -338,7 +338,7 @@ static WindowQuadList clipQuads(const Item *item, const SceneOpenGL::RenderConte
|
|||
{
|
||||
const WindowQuadList quads = item->quads();
|
||||
if (context->clip != infiniteRegion() && !context->hardwareClipping) {
|
||||
const QPoint offset = context->transforms.top().map(QPoint(0, 0));
|
||||
const QPoint offset = context->transformStack.top().map(QPoint(0, 0));
|
||||
|
||||
WindowQuadList ret;
|
||||
ret.reserve(quads.count());
|
||||
|
@ -372,7 +372,7 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context)
|
|||
QMatrix4x4 matrix;
|
||||
matrix.translate(item->position().x(), item->position().y());
|
||||
matrix *= item->transform();
|
||||
context->transforms.push(context->transforms.top() * matrix);
|
||||
context->transformStack.push(context->transformStack.top() * matrix);
|
||||
|
||||
context->opacityStack.push(context->opacityStack.top() * item->opacity());
|
||||
|
||||
|
@ -393,7 +393,7 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context)
|
|||
context->renderNodes.append(RenderNode{
|
||||
.texture = shadow->shadowTexture(),
|
||||
.quads = quads,
|
||||
.transformMatrix = context->transforms.top(),
|
||||
.transformMatrix = context->transformStack.top(),
|
||||
.opacity = context->opacityStack.top(),
|
||||
.hasAlpha = true,
|
||||
.coordinateType = UnnormalizedCoordinates,
|
||||
|
@ -406,7 +406,7 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context)
|
|||
context->renderNodes.append(RenderNode{
|
||||
.texture = renderer->texture(),
|
||||
.quads = quads,
|
||||
.transformMatrix = context->transforms.top(),
|
||||
.transformMatrix = context->transformStack.top(),
|
||||
.opacity = context->opacityStack.top(),
|
||||
.hasAlpha = true,
|
||||
.coordinateType = UnnormalizedCoordinates,
|
||||
|
@ -422,7 +422,7 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context)
|
|||
context->renderNodes.append(RenderNode{
|
||||
.texture = bindSurfaceTexture(surfaceItem),
|
||||
.quads = quads,
|
||||
.transformMatrix = context->transforms.top(),
|
||||
.transformMatrix = context->transformStack.top(),
|
||||
.opacity = context->opacityStack.top(),
|
||||
.hasAlpha = hasAlpha,
|
||||
.coordinateType = UnnormalizedCoordinates,
|
||||
|
@ -440,7 +440,7 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context)
|
|||
}
|
||||
}
|
||||
|
||||
context->transforms.pop();
|
||||
context->transformStack.pop();
|
||||
context->opacityStack.pop();
|
||||
}
|
||||
|
||||
|
@ -506,7 +506,7 @@ void SceneOpenGL::render(Item *item, int mask, const QRegion ®ion, const Wind
|
|||
.hardwareClipping = region != infiniteRegion() && ((mask & Scene::PAINT_WINDOW_TRANSFORMED) || (mask & Scene::PAINT_SCREEN_TRANSFORMED)),
|
||||
};
|
||||
|
||||
renderContext.transforms.push(QMatrix4x4());
|
||||
renderContext.transformStack.push(QMatrix4x4());
|
||||
renderContext.opacityStack.push(data.opacity());
|
||||
|
||||
item->setTransform(transformForPaintData(mask, data));
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
struct RenderContext
|
||||
{
|
||||
QVector<RenderNode> renderNodes;
|
||||
QStack<QMatrix4x4> transforms;
|
||||
QStack<QMatrix4x4> transformStack;
|
||||
QStack<qreal> opacityStack;
|
||||
const QRegion clip;
|
||||
const bool hardwareClipping;
|
||||
|
|
Loading…
Reference in a new issue