| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
| 10 | 10 |
| 11 namespace WebKit { | 11 namespace WebKit { |
| 12 class WebGraphicsContext3D; | 12 class WebGraphicsContext3D; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 class GLHelper; | 16 class GLHelper; |
| 17 class WebGraphicsContext3DCommandBufferImpl; | 17 class WebGraphicsContext3DCommandBufferImpl; |
| 18 | 18 |
| 19 class ImageTransportFactoryAndroid { | 19 class ImageTransportFactoryAndroid { |
| 20 public: | 20 public: |
| 21 ImageTransportFactoryAndroid(); | 21 ImageTransportFactoryAndroid(); |
| 22 ~ImageTransportFactoryAndroid(); | 22 ~ImageTransportFactoryAndroid(); |
| 23 | 23 |
| 24 static ImageTransportFactoryAndroid* GetInstance(); | 24 static ImageTransportFactoryAndroid* GetInstance(); |
| 25 | 25 |
| 26 gfx::GLSurfaceHandle CreateSharedSurfaceHandle(); | 26 gfx::GLSurfaceHandle CreateSharedSurfaceHandle(); |
| 27 void DestroySharedSurfaceHandle(const gfx::GLSurfaceHandle& handle); | 27 void DestroySharedSurfaceHandle(const gfx::GLSurfaceHandle& handle); |
| 28 | 28 |
| 29 uint32_t InsertSyncPoint(); | 29 uint32_t InsertSyncPoint(); |
| 30 uint32_t CreateTexture(); |
| 31 void DeleteTexture(uint32_t id); |
| 32 void AcquireTexture(uint32 texture_id, const signed char* mailbox_name); |
| 33 void ReleaseTexture(uint32 texture_id, const signed char* mailbox_name); |
| 30 | 34 |
| 31 WebKit::WebGraphicsContext3D* GetContext3D(); | 35 WebKit::WebGraphicsContext3D* GetContext3D(); |
| 32 GLHelper* GetGLHelper(); | 36 GLHelper* GetGLHelper(); |
| 33 | 37 |
| 34 private: | 38 private: |
| 35 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context_; | 39 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context_; |
| 36 scoped_ptr<GLHelper> gl_helper_; | 40 scoped_ptr<GLHelper> gl_helper_; |
| 37 }; | 41 }; |
| 38 | 42 |
| 39 } // namespace content | 43 } // namespace content |
| 40 | 44 |
| 41 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_ | 45 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_ |
| OLD | NEW |