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

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

Created:
4 years, 7 months ago by watk
Modified:
4 years, 6 months ago
CC:
chromium-reviews, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
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 Committed: https://crrev.com/e8d35a561423eb3e4520b0ae1fe5a945a62c70af Cr-Commit-Position: refs/heads/master@{#397897}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Partially implemented tying unowned id to StreamTextureImage #

Total comments: 2

Patch Set 3 : rebase only #

Patch Set 4 : Only clear the stream texture service id if the image is changed #

Total comments: 13

Patch Set 5 : rebase #

Patch Set 6 : liberato's comments #

Total comments: 2

Patch Set 7 : Added another test #

Total comments: 2

Patch Set 8 : Add SetLevelImageState #

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 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.h View 1 2 3 4 5 6 7 7 chunks +36 lines, -24 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.cc View 1 2 3 4 5 6 7 5 chunks +52 lines, -31 lines 0 comments Download
M gpu/command_buffer/service/texture_manager_unittest.cc View 1 2 3 4 5 6 7 4 chunks +69 lines, -45 lines 0 comments Download
M gpu/ipc/service/stream_texture_android.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M media/gpu/android_deferred_rendering_backing_strategy.cc View 1 2 chunks +11 lines, -13 lines 0 comments Download
M media/gpu/avda_codec_image.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 29 (11 generated)
watk
piman@ PTAL. This is a precursor to this CL: https://codereview.chromium.org/2005103004/ I wrote a bit of ...
4 years, 7 months ago (2016-05-26 18:52:32 UTC) #4
piman
https://codereview.chromium.org/2014313002/diff/1/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/2014313002/diff/1/gpu/command_buffer/service/texture_manager.cc#newcode1496 gpu/command_buffer/service/texture_manager.cc:1496: SetUnownedServiceId(0); I think I understand the semantics this is ...
4 years, 7 months ago (2016-05-26 22:09:16 UTC) #5
watk
On 2016/05/26 22:09:16, piman wrote: > https://codereview.chromium.org/2014313002/diff/1/gpu/command_buffer/service/texture_manager.cc > File gpu/command_buffer/service/texture_manager.cc (right): > > https://codereview.chromium.org/2014313002/diff/1/gpu/command_buffer/service/texture_manager.cc#newcode1496 > ...
4 years, 7 months ago (2016-05-26 23:36:25 UTC) #6
piman
On Thu, May 26, 2016 at 4:36 PM, <watk@chromium.org> wrote: > On 2016/05/26 22:09:16, piman ...
4 years, 7 months ago (2016-05-27 00:54:35 UTC) #7
watk
On 2016/05/27 00:54:35, piman OOO back 2016-5-31 wrote: > On Thu, May 26, 2016 at ...
4 years, 6 months ago (2016-05-31 16:31:01 UTC) #8
watk
Uploaded some partial progress. I ran into a problem with the way we set the ...
4 years, 6 months ago (2016-05-31 22:10:49 UTC) #9
liberato (no reviews please)
https://codereview.chromium.org/2014313002/diff/20001/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/2014313002/diff/20001/gpu/command_buffer/service/texture_manager.cc#newcode1503 gpu/command_buffer/service/texture_manager.cc:1503: SetStreamTextureServiceId(0); maybe just clear it if image != whatever ...
4 years, 6 months ago (2016-06-01 14:10:44 UTC) #11
watk
https://codereview.chromium.org/2014313002/diff/20001/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/2014313002/diff/20001/gpu/command_buffer/service/texture_manager.cc#newcode1503 gpu/command_buffer/service/texture_manager.cc:1503: SetStreamTextureServiceId(0); On 2016/06/01 14:10:44, liberato wrote: > maybe just ...
4 years, 6 months ago (2016-06-01 20:54:44 UTC) #13
liberato (no reviews please)
nice! -fl https://codereview.chromium.org/2014313002/diff/80001/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (left): https://codereview.chromium.org/2014313002/diff/80001/gpu/command_buffer/service/texture_manager.cc#oldcode1491 gpu/command_buffer/service/texture_manager.cc:1491: info.stream_texture_image = stream_texture_image; wow -- this was ...
4 years, 6 months ago (2016-06-02 14:37:02 UTC) #14
watk
Thanks for the comments! https://codereview.chromium.org/2014313002/diff/80001/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/2014313002/diff/80001/gpu/command_buffer/service/texture_manager.cc#newcode1492 gpu/command_buffer/service/texture_manager.cc:1492: if (info.image != image) { ...
4 years, 6 months ago (2016-06-03 01:09:47 UTC) #15
liberato (no reviews please)
lgtm + suggestion for new test. thanks -fl https://codereview.chromium.org/2014313002/diff/120001/gpu/command_buffer/service/texture_manager_unittest.cc File gpu/command_buffer/service/texture_manager_unittest.cc (right): https://codereview.chromium.org/2014313002/diff/120001/gpu/command_buffer/service/texture_manager_unittest.cc#newcode1737 gpu/command_buffer/service/texture_manager_unittest.cc:1737: TEST_F(TextureTest, ...
4 years, 6 months ago (2016-06-03 14:51:56 UTC) #16
piman
https://codereview.chromium.org/2014313002/diff/140001/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/2014313002/diff/140001/gpu/command_buffer/service/texture_manager.cc#newcode1513 gpu/command_buffer/service/texture_manager.cc:1513: if (info.image != image) { I find this semantic ...
4 years, 6 months ago (2016-06-03 20:32:35 UTC) #17
watk
https://codereview.chromium.org/2014313002/diff/120001/gpu/command_buffer/service/texture_manager_unittest.cc File gpu/command_buffer/service/texture_manager_unittest.cc (right): https://codereview.chromium.org/2014313002/diff/120001/gpu/command_buffer/service/texture_manager_unittest.cc#newcode1737 gpu/command_buffer/service/texture_manager_unittest.cc:1737: TEST_F(TextureTest, OverrideServiceID) { On 2016/06/03 14:51:56, liberato wrote: > ...
4 years, 6 months ago (2016-06-03 20:41:00 UTC) #19
watk
PTAL. This works in my simple testing. Any particular cases I should try Frank?
4 years, 6 months ago (2016-06-03 22:42:04 UTC) #21
piman
LGTM, thanks!
4 years, 6 months ago (2016-06-03 22:48:04 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2014313002/160001
4 years, 6 months ago (2016-06-03 23:51:08 UTC) #25
commit-bot: I haz the power
Committed patchset #8 (id:160001)
4 years, 6 months ago (2016-06-04 03:16:26 UTC) #27
commit-bot: I haz the power
4 years, 6 months ago (2016-06-04 03:19:38 UTC) #29
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/e8d35a561423eb3e4520b0ae1fe5a945a62c70af
Cr-Commit-Position: refs/heads/master@{#397897}

Powered by Google App Engine
This is Rietveld 408576698