| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/layers/video_frame_provider.h" | 9 #include "cc/layers/video_frame_provider.h" |
| 10 #include "gpu/command_buffer/common/mailbox.h" | 10 #include "gpu/command_buffer/common/mailbox.h" |
| 11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace gpu { |
| 14 class WebGraphicsContext3D; | 14 namespace gles2 { |
| 15 } | 15 class GLES2Interface; |
| 16 } // namespace gles2 |
| 17 } // namespace gpu |
| 18 |
| 16 | 19 |
| 17 namespace content { | 20 namespace content { |
| 18 | 21 |
| 19 // The proxy class for the gpu thread to notify the compositor thread | 22 // The proxy class for the gpu thread to notify the compositor thread |
| 20 // when a new video frame is available. | 23 // when a new video frame is available. |
| 21 class StreamTextureProxy { | 24 class StreamTextureProxy { |
| 22 public: | 25 public: |
| 23 virtual ~StreamTextureProxy() {} | 26 virtual ~StreamTextureProxy() {} |
| 24 | 27 |
| 25 // Initialize and bind to the current thread, which becomes the thread that | 28 // Initialize and bind to the current thread, which becomes the thread that |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 unsigned* texture_mailbox_sync_point) = 0; | 71 unsigned* texture_mailbox_sync_point) = 0; |
| 69 | 72 |
| 70 // Destroy the streamTexture for the given texture id, as well as the | 73 // Destroy the streamTexture for the given texture id, as well as the |
| 71 // client side texture. | 74 // client side texture. |
| 72 virtual void DestroyStreamTexture(unsigned texture_id) = 0; | 75 virtual void DestroyStreamTexture(unsigned texture_id) = 0; |
| 73 | 76 |
| 74 // Set the streamTexture size for the given stream Id. | 77 // Set the streamTexture size for the given stream Id. |
| 75 virtual void SetStreamTextureSize(int32 texture_id, | 78 virtual void SetStreamTextureSize(int32 texture_id, |
| 76 const gfx::Size& size) = 0; | 79 const gfx::Size& size) = 0; |
| 77 | 80 |
| 78 virtual blink::WebGraphicsContext3D* Context3d() = 0; | 81 virtual gpu::gles2::GLES2Interface* ContextGL() = 0; |
| 79 }; | 82 }; |
| 80 | 83 |
| 81 } // namespace content | 84 } // namespace content |
| 82 | 85 |
| 83 #endif // CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_H_ | 86 #endif // CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_H_ |
| OLD | NEW |