diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp index c8c4ecfb6ef..5b09ac34d5f 100644 --- a/gfx/gl/GLContextProviderEGL.cpp +++ b/gfx/gl/GLContextProviderEGL.cpp @@ -475,6 +475,15 @@ public: return; // Else, surface changed... + if (Screen()) { + /* Blit `draw` to `read` if we need to, before we potentially juggle + * `read` around. If we don't, we might attach a different `read`, + * and *then* hit AssureBlitted, which will blit a dirty `draw` onto + * the wrong `read`! + */ + Screen()->AssureBlitted(); + } + mCurSurface = eglSurface; MakeCurrent(true); }