Skip to content

Commit

Permalink
TEMP: macos alpha workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
CendioOssman committed Apr 5, 2024
1 parent cae394d commit ff02011
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions vncviewer/PlatformPixelBuffer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ PlatformPixelBuffer::~PlatformPixelBuffer()
void PlatformPixelBuffer::commitBufferRW(const rfb::Rect& r)
{
FullFramePixelBuffer::commitBufferRW(r);

#if 0
uint32_t* buf;
int stride;

buf = (uint32_t*)FullFramePixelBuffer::getBufferRW(r, &stride);
for (int y = 0; y < r.width(); y++) {
for (int x = 0; x < r.height(); x++)
*buf++ |= 0xff000000;
buf += stride - r.width();
}
FullFramePixelBuffer::commitBufferRW(r);
#endif

mutex.lock();
damage.assign_union(rfb::Region(r));
mutex.unlock();
Expand Down
5 changes: 5 additions & 0 deletions vncviewer/abstractvncview.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,11 @@ void QAbstractVNCView::paintEvent(QPaintEvent* event)
data = framebuffer->getBuffer(rfbrect, &stride);
QImage image(data, w, h, stride * 4, QImage::Format_RGB32);

#if 0
pixmapPainter.fillRect(bounds, QColor("#ff000000"));
pixmapPainter.setCompositionMode(QPainter::CompositionMode_Plus);
#endif

pixmapPainter.drawImage(bounds, image);
}
damage = QRegion();
Expand Down

0 comments on commit ff02011

Please sign in to comment.