]> git.mdlowis.com Git - proto/labwc.git/commit
magnifier: fix high CPU usage even with magnifier disabled
authortokyo4j <hrak1529@gmail.com>
Mon, 20 May 2024 11:36:30 +0000 (20:36 +0900)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 21 May 2024 15:41:01 +0000 (17:41 +0200)
commit48742163fd0c1626897b607b3c8adfa7f42093da
treeba4d7de255aed3d67755f5c43582118f6b276398
parentc1646ef2ea9f6fd5fa8457ec750d624e84225f60
magnifier: fix high CPU usage even with magnifier disabled

Fixes the high CPU usage issue reported by @droc12345.

Changing `last_mag != is_magnify_on()` to `last_mag == is_magnify_on()`
works fine, but this check isn't needed in the first place because
magnifier state changes call `wlr_output_schedule_frame()`, which sets
`wlr_output->needs_frame`.

Also added a FIXME comment regarding the performance issue when the
magnifier is enabled.
src/common/scene-helpers.c