compositor: remove redundant geometry dirtying
authorPekka Paalanen <ppaalanen@gmail.com>
Fri, 8 Mar 2013 12:56:48 +0000 (14:56 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 19 Mar 2013 02:19:54 +0000 (22:19 -0400)
commitf1f48cfa35cc4068388069e6ac3b688a2716a1de
treebdb57d9f088315b9e34ba124ee8e807836ba0a9e
parent14b2fe702016d117538ce08eb4177d88154e9bc5
compositor: remove redundant geometry dirtying

Remove redundant geometry dirtying from surface_commit() to simplify
further changes.

This code was added in commit 5df8ecac5d31467122a9d8bda6241d5957ae6848
"compositor: Fix partial repaints"

as the fix to:
https://bugs.freedesktop.org/show_bug.cgi?id=56538

The issue fixed by that commit was making the geometry dirty on every
attach, which caused full-surface repaints every time. The bug was
probably introduced by the opaque region changes during implementing
wl_surface.commit. The mentioned commit fixes the opaque handling by
comparing the new and old regions.

However, the commit also introduces additional checks that set
geometry.dirty. In the current code base, this should be unnecessary.

If the pending.sx or pending.sy are not zero, or if the surface size
changes, the configure() hook is responsible for applying the new
values, and so also marking the geometry dirty.

The configure() hook is only called, if there has been a new
wl_surface.attach. Nothing else can change these variables, so this
should be enough.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
src/compositor.c