| 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 gfx { | 11 namespace gfx { |
| 12 class GLShareGroup; | 12 class GLShareGroup; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace WebKit { | 15 namespace blink { |
| 16 class WebGraphicsContext3D; | 16 class WebGraphicsContext3D; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 class GLHelper; | 20 class GLHelper; |
| 21 class GLContextLostListener; | 21 class GLContextLostListener; |
| 22 | 22 |
| 23 class ImageTransportFactoryAndroidObserver { | 23 class ImageTransportFactoryAndroidObserver { |
| 24 public: | 24 public: |
| 25 virtual ~ImageTransportFactoryAndroidObserver() {} | 25 virtual ~ImageTransportFactoryAndroidObserver() {} |
| 26 virtual void OnLostResources() = 0; | 26 virtual void OnLostResources() = 0; |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 class ImageTransportFactoryAndroid { | 29 class ImageTransportFactoryAndroid { |
| 30 public: | 30 public: |
| 31 virtual ~ImageTransportFactoryAndroid(); | 31 virtual ~ImageTransportFactoryAndroid(); |
| 32 | 32 |
| 33 static ImageTransportFactoryAndroid* GetInstance(); | 33 static ImageTransportFactoryAndroid* GetInstance(); |
| 34 | 34 |
| 35 virtual uint32_t InsertSyncPoint() = 0; | 35 virtual uint32_t InsertSyncPoint() = 0; |
| 36 virtual void WaitSyncPoint(uint32_t sync_point) = 0; | 36 virtual void WaitSyncPoint(uint32_t sync_point) = 0; |
| 37 virtual uint32_t CreateTexture() = 0; | 37 virtual uint32_t CreateTexture() = 0; |
| 38 virtual void DeleteTexture(uint32_t id) = 0; | 38 virtual void DeleteTexture(uint32_t id) = 0; |
| 39 virtual void AcquireTexture( | 39 virtual void AcquireTexture( |
| 40 uint32 texture_id, const signed char* mailbox_name) = 0; | 40 uint32 texture_id, const signed char* mailbox_name) = 0; |
| 41 | 41 |
| 42 virtual WebKit::WebGraphicsContext3D* GetContext3D() = 0; | 42 virtual blink::WebGraphicsContext3D* GetContext3D() = 0; |
| 43 virtual GLHelper* GetGLHelper() = 0; | 43 virtual GLHelper* GetGLHelper() = 0; |
| 44 | 44 |
| 45 static void AddObserver(ImageTransportFactoryAndroidObserver* observer); | 45 static void AddObserver(ImageTransportFactoryAndroidObserver* observer); |
| 46 static void RemoveObserver(ImageTransportFactoryAndroidObserver* observer); | 46 static void RemoveObserver(ImageTransportFactoryAndroidObserver* observer); |
| 47 | 47 |
| 48 protected: | 48 protected: |
| 49 ImageTransportFactoryAndroid(); | 49 ImageTransportFactoryAndroid(); |
| 50 | 50 |
| 51 scoped_ptr<GLContextLostListener> context_lost_listener_; | 51 scoped_ptr<GLContextLostListener> context_lost_listener_; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 } // namespace content | 54 } // namespace content |
| 55 | 55 |
| 56 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_ | 56 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_ |
| OLD | NEW |