Skip to content

Commit

Permalink
Create a dummy texture when the mailbox is invalid in CreateAndConsum…
Browse files Browse the repository at this point in the history
…eTexture.

If glCreateAndConsumeTextureINTERNAL fails to find a mailbox, the client still
expects the texture ID to be valid.  If the texture does not exist, the ID could
overlap with another and display incorrect textures.

BUG=851878

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I53cea969fcace7246ebce8fc193b3246f511fbc3
Reviewed-on: https://chromium-review.googlesource.com/1129464
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573719}
  • Loading branch information
vonture authored and Commit Bot committed Jul 10, 2018
1 parent 75f4fc9 commit 216b18a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3988,6 +3988,9 @@ error::Error GLES2DecoderPassthroughImpl::DoCreateAndConsumeTextureINTERNAL(
scoped_refptr<TexturePassthrough> texture = static_cast<TexturePassthrough*>(
group_->mailbox_manager()->ConsumeTexture(mb));
if (texture == nullptr) {
// Create texture to handle invalid mailbox (see http://crbug.com/472465 and
// http://crbug.com/851878).
DoGenTextures(1, &texture_client_id);
InsertError(GL_INVALID_OPERATION, "Invalid mailbox name.");
return error::kNoError;
}
Expand Down

0 comments on commit 216b18a

Please sign in to comment.