35 const QRegion dirty = region.intersected(
layer()->mapToGlobal(
layer()->rect()).toAlignedRect());
36 if (dirty.isEmpty()) {
44 const QSize bufferSize = cursorRect.size();
46 if (!m_texture || m_texture->size() != bufferSize || m_texture->internalFormat() != bufferFormat) {
51 m_framebuffer = std::make_unique<GLFramebuffer>(m_texture.get());
66 mvp.ortho(QRectF(QPointF(0, 0), m_output->
transform().
map(renderTarget.
size())));
67 mvp.translate(cursorRect.x(), cursorRect.y());
76 glEnable(GL_SCISSOR_TEST);
82 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
86 m_texture->render(clipRegion, cursorRect.size(), clipping);
90 glDisable(GL_SCISSOR_TEST);
static std::unique_ptr< GLTexture > allocate(GLenum internalFormat, const QSize &size, int levels=1)