diff --git a/repos/pc/src/driver/framebuffer/intel/pc/lx_user.c b/repos/pc/src/driver/framebuffer/intel/pc/lx_user.c index 3c257db068..db3865f15e 100644 --- a/repos/pc/src/driver/framebuffer/intel/pc/lx_user.c +++ b/repos/pc/src/driver/framebuffer/intel/pc/lx_user.c @@ -878,22 +878,22 @@ static int update_content(void *) if (connector->status != connector_status_connected) continue; - if (valid_id) { + if (valid_id) unchanged[connector->index] ++; - - if (unchanged[connector->index] > ATTEMPTS_BEFORE_STOP) - continue; - } else printk("%s: connector id invalid %d\n", __func__, connector->index); - block_task = false; - if (valid_id) may_sleep = unchanged[connector->index] >= ATTEMPTS_BEFORE_STOP; - if (!lx_emul_i915_blit(connector->index, may_sleep)) + if (!lx_emul_i915_blit(connector->index, may_sleep)) { + if (!may_sleep) + block_task = false; + continue; + } + + block_task = false; if (valid_id) unchanged[connector->index] = 0; diff --git a/repos/pc/src/driver/framebuffer/intel/pc/main.cc b/repos/pc/src/driver/framebuffer/intel/pc/main.cc index 70299d3158..68fb10db22 100644 --- a/repos/pc/src/driver/framebuffer/intel/pc/main.cc +++ b/repos/pc/src/driver/framebuffer/intel/pc/main.cc @@ -105,21 +105,12 @@ struct Framebuffer::Driver !connector.screen.constructed()) return; - connector.screen->with_texture([&] (Texture const &texture) { + Surface surface((Pixel*)connector.base, connector.size_phys); - auto const affected = connector.capture->capture_at({ 0, 0}); + auto box = connector.screen->apply_to_surface(surface); - affected.for_each_rect([&] (Capture::Rect const rect) { - - Surface surface((Pixel*)connector.base, - connector.size_phys); - - surface.clip(rect); - Blit_painter::paint(surface, texture, Capture::Point(0, 0)); - - dirty = true; - }); - }); + if (box.valid()) + dirty = true; if (!dirty && may_stop) connector.capture->capture_stopped();