Skip to content

Commit

Permalink
Multiplanar: Return nullptr if cannot create texture holders
Browse files Browse the repository at this point in the history
For GLTexture Ozone Representation, if we cannot create Texture Holders
(due to NativePixmapGLBinding creation failure), we should return
nullptr instead of creating a GL representation without textures.

(cherry picked from commit 3663a0e)

Bug: 1411794
Change-Id: Ia055dc295d55db7560ccf60fa7c1352d16b8235d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4212732
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1099890}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4215091
Reviewed-by: vikas soni <vikassoni@chromium.org>
Cr-Commit-Position: refs/branch-heads/5563@{#116}
Cr-Branched-From: 3ac59a6-refs/heads/main@{#1097615}
  • Loading branch information
Saifuddin Hitawala authored and Chromium LUCI CQ committed Feb 2, 2023
1 parent 67cd4fb commit 0313d7f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ GLTextureOzoneImageRepresentation::Create(
GLOzoneImageRepresentationShared::CreateShared(
backing, std::move(pixmap), plane,
/*is_passthrough=*/false, cached_texture_holders);
if (texture_holders.empty()) {
return nullptr;
}
return base::WrapUnique<GLTextureOzoneImageRepresentation>(
new GLTextureOzoneImageRepresentation(manager, backing, tracker,
std::move(texture_holders)));
Expand Down Expand Up @@ -447,6 +450,9 @@ GLTexturePassthroughOzoneImageRepresentation::Create(
GLOzoneImageRepresentationShared::CreateShared(
backing, std::move(pixmap), plane,
/*is_passthrough=*/true, cached_texture_holders);
if (texture_holders.empty()) {
return nullptr;
}
return base::WrapUnique<GLTexturePassthroughOzoneImageRepresentation>(
new GLTexturePassthroughOzoneImageRepresentation(
manager, backing, tracker, std::move(texture_holders)));
Expand Down

0 comments on commit 0313d7f

Please sign in to comment.