Commit 6e734a1f authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Remove needless current state copy

If nothing has been committed to the cached state, no changes to the
current state will be done.

If a synchronized sub-surface has been committed, the pending state will
be merged with the cached state. The latter state will be applied when
the parent surface is committed.
parent c55de7b7
......@@ -207,19 +207,6 @@ SubSurfaceInterface::SubSurfaceInterface(SurfaceInterface *surface, SurfaceInter
surfacePrivate->subSurface = this;
// copy current state to subSurfacePending state
// it's the reference for all new pending state which needs to be committed
surfacePrivate->cached = surfacePrivate->current;
surfacePrivate->cached.blurIsSet = false;
surfacePrivate->cached.bufferIsSet = false;
surfacePrivate->cached.childrenChanged = false;
surfacePrivate->cached.contrastIsSet = false;
surfacePrivate->cached.inputIsSet = false;
surfacePrivate->cached.opaqueIsSet = false;
surfacePrivate->cached.shadowIsSet = false;
surfacePrivate->cached.slideIsSet = false;
connect(surface, &SurfaceInterface::destroyed, this, [this]() { delete this; });
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment