scene: Drop ItemRendererOpenGL::RenderNode::coordinateType
All render nodes have unnormalized texture coordinates now, so this field is not needed anymore.
This commit is contained in:
parent
d12112b7a5
commit
49b2b0d001
2 changed files with 1 additions and 6 deletions
|
@ -163,7 +163,6 @@ void ItemRendererOpenGL::createRenderNode(Item *item, RenderContext *context)
|
||||||
.transformMatrix = context->transformStack.top(),
|
.transformMatrix = context->transformStack.top(),
|
||||||
.opacity = context->opacityStack.top(),
|
.opacity = context->opacityStack.top(),
|
||||||
.hasAlpha = true,
|
.hasAlpha = true,
|
||||||
.coordinateType = UnnormalizedCoordinates,
|
|
||||||
.colorDescription = item->colorDescription(),
|
.colorDescription = item->colorDescription(),
|
||||||
.renderingIntent = item->renderingIntent(),
|
.renderingIntent = item->renderingIntent(),
|
||||||
.bufferReleasePoint = nullptr,
|
.bufferReleasePoint = nullptr,
|
||||||
|
@ -178,7 +177,6 @@ void ItemRendererOpenGL::createRenderNode(Item *item, RenderContext *context)
|
||||||
.transformMatrix = context->transformStack.top(),
|
.transformMatrix = context->transformStack.top(),
|
||||||
.opacity = context->opacityStack.top(),
|
.opacity = context->opacityStack.top(),
|
||||||
.hasAlpha = true,
|
.hasAlpha = true,
|
||||||
.coordinateType = UnnormalizedCoordinates,
|
|
||||||
.colorDescription = item->colorDescription(),
|
.colorDescription = item->colorDescription(),
|
||||||
.renderingIntent = item->renderingIntent(),
|
.renderingIntent = item->renderingIntent(),
|
||||||
.bufferReleasePoint = nullptr,
|
.bufferReleasePoint = nullptr,
|
||||||
|
@ -195,7 +193,6 @@ void ItemRendererOpenGL::createRenderNode(Item *item, RenderContext *context)
|
||||||
.transformMatrix = context->transformStack.top(),
|
.transformMatrix = context->transformStack.top(),
|
||||||
.opacity = context->opacityStack.top(),
|
.opacity = context->opacityStack.top(),
|
||||||
.hasAlpha = pixmap->hasAlphaChannel(),
|
.hasAlpha = pixmap->hasAlphaChannel(),
|
||||||
.coordinateType = UnnormalizedCoordinates,
|
|
||||||
.colorDescription = item->colorDescription(),
|
.colorDescription = item->colorDescription(),
|
||||||
.renderingIntent = item->renderingIntent(),
|
.renderingIntent = item->renderingIntent(),
|
||||||
.bufferReleasePoint = surfaceItem->bufferReleasePoint(),
|
.bufferReleasePoint = surfaceItem->bufferReleasePoint(),
|
||||||
|
@ -210,7 +207,6 @@ void ItemRendererOpenGL::createRenderNode(Item *item, RenderContext *context)
|
||||||
.transformMatrix = context->transformStack.top(),
|
.transformMatrix = context->transformStack.top(),
|
||||||
.opacity = context->opacityStack.top(),
|
.opacity = context->opacityStack.top(),
|
||||||
.hasAlpha = imageItem->image().hasAlphaChannel(),
|
.hasAlpha = imageItem->image().hasAlphaChannel(),
|
||||||
.coordinateType = UnnormalizedCoordinates,
|
|
||||||
.colorDescription = item->colorDescription(),
|
.colorDescription = item->colorDescription(),
|
||||||
.renderingIntent = item->renderingIntent(),
|
.renderingIntent = item->renderingIntent(),
|
||||||
.bufferReleasePoint = nullptr,
|
.bufferReleasePoint = nullptr,
|
||||||
|
@ -312,7 +308,7 @@ void ItemRendererOpenGL::renderItem(const RenderTarget &renderTarget, const Rend
|
||||||
} else {
|
} else {
|
||||||
texture = std::get<OpenGLSurfaceContents>(renderNode.texture).planes.constFirst().get();
|
texture = std::get<OpenGLSurfaceContents>(renderNode.texture).planes.constFirst().get();
|
||||||
}
|
}
|
||||||
renderNode.geometry.postProcessTextureCoordinates(texture->matrix(renderNode.coordinateType));
|
renderNode.geometry.postProcessTextureCoordinates(texture->matrix(UnnormalizedCoordinates));
|
||||||
|
|
||||||
renderNode.geometry.copy(map->subspan(v));
|
renderNode.geometry.copy(map->subspan(v));
|
||||||
v += renderNode.geometry.count();
|
v += renderNode.geometry.count();
|
||||||
|
|
|
@ -29,7 +29,6 @@ public:
|
||||||
int vertexCount = 0;
|
int vertexCount = 0;
|
||||||
qreal opacity = 1;
|
qreal opacity = 1;
|
||||||
bool hasAlpha = false;
|
bool hasAlpha = false;
|
||||||
TextureCoordinateType coordinateType = UnnormalizedCoordinates;
|
|
||||||
ColorDescription colorDescription;
|
ColorDescription colorDescription;
|
||||||
RenderingIntent renderingIntent;
|
RenderingIntent renderingIntent;
|
||||||
std::shared_ptr<SyncReleasePoint> bufferReleasePoint;
|
std::shared_ptr<SyncReleasePoint> bufferReleasePoint;
|
||||||
|
|
Loading…
Reference in a new issue