Skip to content

Commit

Permalink
Don't check for buffers or scale when Cursor::set_scale is called.
Browse files Browse the repository at this point in the history
In the grand scheme of things, the cursor isn't scaled nor is it
shown/hidden that much. So this check doesn't help much, while breaking
tests
  • Loading branch information
tarek-y-ismail committed Feb 6, 2025
1 parent e2d9975 commit 24b53e2
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
3 changes: 0 additions & 3 deletions src/platforms/atomic-kms/server/kms/cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,6 @@ void mir::graphics::atomic::Cursor::set_scale(float new_scale)
{
std::lock_guard lg(guard);

if(!argb8888.empty() && new_scale == current_scale)
return;

current_scale = new_scale;
size = current_cursor_image->size() * new_scale;
auto const scaled_cursor_buf = mg::scale_cursor_image(current_cursor_image, new_scale);
Expand Down
3 changes: 0 additions & 3 deletions src/platforms/gbm-kms/server/kms/cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,6 @@ void mir::graphics::gbm::Cursor::set_scale(float new_scale)
{
std::lock_guard lg(guard);

if(!argb8888.empty() && new_scale == current_scale)
return;

current_scale = new_scale;
size = current_cursor_image->size() * new_scale;
auto const scaled_cursor_buf = mg::scale_cursor_image(current_cursor_image, new_scale);
Expand Down
3 changes: 0 additions & 3 deletions src/platforms/wayland/cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ void mir::platform::wayland::Cursor::set_scale(float new_scale)
{
std::lock_guard lock{mutex};

if(buffer && new_scale == current_scale)
return;

current_scale = new_scale;

if (buffer) wl_buffer_destroy(buffer);
Expand Down
3 changes: 0 additions & 3 deletions src/server/graphics/software_cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,6 @@ void mir::graphics::SoftwareCursor::set_scale(float new_scale)
{
std::lock_guard lg{guard};

if(renderable && new_scale == current_scale)
return;

current_scale = new_scale;
auto const to_remove = renderable? renderable: nullptr;
renderable = create_scaled_renderable_for_current_cursor(new_scale);
Expand Down

0 comments on commit 24b53e2

Please sign in to comment.