Skip to content

Commit

Permalink
[sailfishos][compositor] Reset CompositorOGL::mFrameInProgress when e…
Browse files Browse the repository at this point in the history
…arly leaving ::BeginPaint.

If the size of the compositing surface is 0 and we ignore the BeginPaint
call we need to make sure mFrameInProgress is not left set to true. If
it is the next ::BeginFrame call will trigger an assertion failure.
  • Loading branch information
tworaz authored and rainemak committed May 27, 2020
1 parent 085ea19 commit 8bdb949
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gfx/layers/opengl/CompositorOGL.cpp
Expand Up @@ -657,8 +657,10 @@ CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,

// We can't draw anything to something with no area
// so just return
if (width == 0 || height == 0)
if (width == 0 || height == 0) {
mFrameInProgress = false;
return;
}

// We're about to actually draw a frame.
mFrameInProgress = true;
Expand Down

0 comments on commit 8bdb949

Please sign in to comment.