소스 검색

Only draw overlays when needed

Some backends don't like empty draw operations, so have an early check.

(cherry picked from commit 0630434292)
tags/v1.8.0
Pierre Ossman 7 년 전
부모
커밋
3cd0de1d0a
1개의 변경된 파일12개의 추가작업 그리고 8개의 파일을 삭제
  1. 12
    8
      vncviewer/DesktopWindow.cxx

+ 12
- 8
vncviewer/DesktopWindow.cxx 파일 보기

@@ -347,10 +347,12 @@ void DesktopWindow::draw()

fl_clip_box(ox, oy, ow, oh, ox, oy, ow, oh);

if (offscreen)
statsGraph->blend(offscreen, ox - X, oy - Y, ox, oy, ow, oh, 204);
else
statsGraph->blend(ox - X, oy - Y, ox, oy, ow, oh, 204);
if ((ow != 0) && (oh != 0)) {
if (offscreen)
statsGraph->blend(offscreen, ox - X, oy - Y, ox, oy, ow, oh, 204);
else
statsGraph->blend(ox - X, oy - Y, ox, oy, ow, oh, 204);
}
}

// Overlay (if active)
@@ -364,10 +366,12 @@ void DesktopWindow::draw()

fl_clip_box(ox, oy, ow, oh, ox, oy, ow, oh);

if (offscreen)
overlay->blend(offscreen, ox - X, oy - Y, ox, oy, ow, oh, overlayAlpha);
else
overlay->blend(ox - X, oy - Y, ox, oy, ow, oh, overlayAlpha);
if ((ow != 0) && (oh != 0)) {
if (offscreen)
overlay->blend(offscreen, ox - X, oy - Y, ox, oy, ow, oh, overlayAlpha);
else
overlay->blend(ox - X, oy - Y, ox, oy, ow, oh, overlayAlpha);
}
}

// Flush offscreen surface to screen

Loading…
취소
저장