aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp')
-rw-r--r--src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp b/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp
index d728686248..2c71c1610a 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp
+++ b/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp
@@ -211,21 +211,14 @@ void QSGOpenVGInternalRectangleNode::render()
} else {
vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);
vgLoadIdentity();
- if (m_radius > 0) {
- // Fallback to rendering to an image for rounded rects with perspective transforms
- if (m_offscreenSurface == nullptr || m_offscreenSurface->size() != QSize(std::ceil(m_rect.width()), std::ceil(m_rect.height()))) {
- delete m_offscreenSurface;
- m_offscreenSurface = new QOpenVGOffscreenSurface(QSize(std::ceil(m_rect.width()), std::ceil(m_rect.height())));
- }
-
- m_offscreenSurface->makeCurrent();
- } else if (m_offscreenSurface) {
+ // Fallback to rendering to an image for rounded rects with perspective transforms
+ if (m_offscreenSurface == nullptr || m_offscreenSurface->size() != QSize(std::ceil(m_rect.width()), std::ceil(m_rect.height()))) {
delete m_offscreenSurface;
- m_offscreenSurface = nullptr;
+ m_offscreenSurface = new QOpenVGOffscreenSurface(QSize(std::ceil(m_rect.width()), std::ceil(m_rect.height())));
}
+ m_offscreenSurface->makeCurrent();
}
-
// If path is dirty
if (m_pathDirty) {
vgClearPath(m_rectanglePath, VG_PATH_CAPABILITY_APPEND_TO);
@@ -291,7 +284,7 @@ void QSGOpenVGInternalRectangleNode::render()
vgDrawPath(m_rectanglePath, VG_FILL_PATH);
}
- if (!transform().isAffine() && m_radius > 0) {
+ if (!transform().isAffine()) {
m_offscreenSurface->doneCurrent();
// Render offscreen surface
vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE);