Chromium Code Reviews
DescriptionStreamTextureImages can now override a Texture's service id
Previously Textures could have an unowned service id, which is used in
place of their service id, except that its lifetime is managed
externally. The use case this is AVDACodecImages, which use a single
SurfaceTexture to back multiple Textures.
This change more explicitly ties the unowned service id concept to
StreamTextureImages, and makes it possible to have StreamTextureImages
own the lifetime of the unowned service id (now called the stream
texture service id), by resetting the service id back to its original
value if a non-StreamTextureImage is bound. If this were not done and a
new image was bound to a level that previously had a
StreamTextureImage, the service id would still be the unowned stream
texture service id, but the StreamTextureImage would be deleted. That
meant it was previously not possible for StreamTextureImages to own the
lifetime of the unowned service id without possibly leaving the
Texture in an invalid state.
Now we can have multiple AVDACodecImages, bound to different Textures,
share a SurfaceTexture service id and safely delete the texture when all
of the AVDACodecImages are destructed.
This CL also adds Texture::SetLevelImageState for setting only the
ImageState and not changing the bound image.
BUG=614090
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel
Review-Url: https://codereview.chromium.org/2014313002
Cr-Commit-Position: refs/heads/master@{#397897}
(cherry picked from commit e8d35a561423eb3e4520b0ae1fe5a945a62c70af)
Committed: https://chromium.googlesource.com/chromium/src/+/4a8723b44c79364d23c4a6223971cc0d10ebe574
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||