Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Issue 2051633002: StreamTextureImages can now override a Texture's service id (Closed)

Created:
4 years, 6 months ago by watk
Modified:
4 years, 6 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2743
Target Ref:
refs/pending/branch-heads/2743
Project:
chromium
Visibility:
Public.

Description

StreamTextureImages 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -119 lines) Patch
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.h View 7 chunks +36 lines, -24 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.cc View 5 chunks +52 lines, -31 lines 0 comments Download
M gpu/command_buffer/service/texture_manager_unittest.cc View 4 chunks +69 lines, -45 lines 0 comments Download
M gpu/ipc/service/stream_texture_android.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M media/gpu/android_deferred_rendering_backing_strategy.cc View 2 chunks +11 lines, -13 lines 0 comments Download
M media/gpu/avda_codec_image.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
watk
4 years, 6 months ago (2016-06-08 22:33:24 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
4a8723b44c79364d23c4a6223971cc0d10ebe574.

Powered by Google App Engine
This is Rietveld 408576698