Commit 61773640 by Geoff Lang Committed by Commit Bot

Skip PostSubBuffer calls that have zero size.

BUG=810411 Change-Id: I8770b69fe4ab8a8f9bacd141c89e7f83f67f15fb Reviewed-on: https://chromium-review.googlesource.com/911589Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent f8be756e
...@@ -230,6 +230,11 @@ Error Surface::postSubBuffer(const gl::Context *context, ...@@ -230,6 +230,11 @@ Error Surface::postSubBuffer(const gl::Context *context,
EGLint width, EGLint width,
EGLint height) EGLint height)
{ {
if (width == 0 || height == 0)
{
return egl::NoError();
}
return mImplementation->postSubBuffer(context, x, y, width, height); return mImplementation->postSubBuffer(context, x, y, width, height);
} }
......
...@@ -144,6 +144,7 @@ egl::Error DXGISwapChainWindowSurfaceWGL::postSubBuffer(const gl::Context *conte ...@@ -144,6 +144,7 @@ egl::Error DXGISwapChainWindowSurfaceWGL::postSubBuffer(const gl::Context *conte
EGLint width, EGLint width,
EGLint height) EGLint height)
{ {
ASSERT(width > 0 && height > 0);
ASSERT(mSwapChain1 != nullptr); ASSERT(mSwapChain1 != nullptr);
mFunctionsGL->flush(); mFunctionsGL->flush();
......
Markdown is supported
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