gpu rtc video: Don't destroy a video texture in the destructor until it's returned.
commit95dfc01b1a51696f0bb5bba07b1e659411583390
authordongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 25 Mar 2014 00:56:30 +0000 (25 00:56 +0000)
committerdongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 25 Mar 2014 00:56:30 +0000 (25 00:56 +0000)
tree8f2c8488d0f303a299ae65437ef3d388729f0bf1
parent37b3dd64cd7ead4891a1e8740be9787366800206
gpu rtc video: Don't destroy a video texture in the destructor until it's returned.

This CL fixes the bug that RVD makes the compositor get following gl error.
[20074:20074:0317/145233:1532049594488:ERROR:gles2_cmd_decoder.cc(10071)]
[.Compositor-0x731c2a2e9a0]GL ERROR :GL_INVALID_OPERATION : glConsumeTextureCHROMIUM: invalid mailbox name

Currently, RTCVideoDecoder deletes all textures, even if some textures are
used by the clients. This CL makes "release callback" be able to delete remained
textures even after RTCVideoDecoder is destructed.

This pattern is very similar that GpuVideoDecoder, accelerated 2d canvas and
WebGL release remained mailboxes. See GpuVideoDecoder.

In addition, this CL removes |dismissed_picture_buffers_| because we can know
Set{|dismissed_picture_buffers_|} by Sets Algebra A - B;
Set{|picture_buffers_at_display_|} - Set{|assigned_picture_buffers_|}.

TEST=Run http://apprtc.appspot.com/?debug=loopback on Nexus 5.

BUG=350925, 344393

Review URL: https://codereview.chromium.org/202023006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259065 0039d316-1c4b-4281-b951-d872f2087c98
content/renderer/media/rtc_video_decoder.cc
content/renderer/media/rtc_video_decoder.h