diff options
author | dongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-01 15:21:20 +0000 |
---|---|---|
committer | dongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-01 15:21:20 +0000 |
commit | 5448f9b40a752355169ed78dc70584d9a6410db0 (patch) | |
tree | a7eff1668013e8d569fa63816607f03f55f90416 /content/renderer/android | |
parent | 5efcce1721748e6d61b8dfbc9b314da24771540c (diff) | |
download | chromium_src-5448f9b40a752355169ed78dc70584d9a6410db0.zip chromium_src-5448f9b40a752355169ed78dc70584d9a6410db0.tar.gz chromium_src-5448f9b40a752355169ed78dc70584d9a6410db0.tar.bz2 |
Android Video: Don't destroy a video texture in the destructor until it's returned.
This CL fixes the bug that WMPA makes the compositor get following gl error.
E/chromium(12686): [12686:12717:0327/005938:110608389551:ERROR:gles2_cmd_decoder.cc(10082)]
[.BrowserCompositor-0x62cdff20]GL ERROR :GL_INVALID_OPERATION : glConsumeTextureCHROMIUM:
invalid mailbox name
Currently, WebMediaPlayerAndroid deletes a texture, even if the texture is
used by the clients. This CL makes "release callback" be able to delete in-display
texture even after WebMediaPlayerAndroid is destructed.
This pattern is very similar that GpuVideoDecoder, accelerated 2d canvas and
WebGL release remained mailboxes. See GpuVideoDecoder.
Major changes:
1. Make StreamTextureFactory ref-counted to use it even after WMPA is destructed.
2. Speaking stream texture, texture_id_ is origin and all VideoFrame objects refer to texture_id_.
When all VideoFrame objects and texture_id_ are deleted, the stream texture is deleted.
3. Delete redundant StreamTextureFactory::DestroyStreamTexture().
Test=Run following tests on Nexus 5.
- http://www.quirksmode.org/html5/tests/video.html for HW Video.
- http://html5demos.com/video-canvas for Accelerated 2D Canvas.
- http://people.mozilla.org/~bjacob/mdn_samples_webgl_sample8/index.html for WebGL.
BUG=350925
Review URL: https://codereview.chromium.org/192813003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260871 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/android')
-rw-r--r-- | content/renderer/android/synchronous_compositor_factory.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content/renderer/android/synchronous_compositor_factory.h b/content/renderer/android/synchronous_compositor_factory.h index 18a907e..6b4f5e5 100644 --- a/content/renderer/android/synchronous_compositor_factory.h +++ b/content/renderer/android/synchronous_compositor_factory.h @@ -51,7 +51,7 @@ class SynchronousCompositorFactory { GetOffscreenContextProviderForMainThread() = 0; virtual scoped_refptr<cc::ContextProvider> GetOffscreenContextProviderForCompositorThread() = 0; - virtual scoped_ptr<StreamTextureFactory> CreateStreamTextureFactory( + virtual scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory( int view_id) = 0; protected: |