Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: content/browser/renderer_host/image_transport_factory_android.h

Issue 312803002: Android media: VideoFrame should not store so many sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ios build Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/common/content_export.h"
9 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
10 11
11 namespace gfx { 12 namespace gfx {
12 class GLShareGroup; 13 class GLShareGroup;
13 } 14 }
14 15
15 namespace gpu { 16 namespace gpu {
16 namespace gles2 { 17 namespace gles2 {
17 class GLES2Interface; 18 class GLES2Interface;
18 } 19 }
19 } 20 }
20 21
21 namespace content { 22 namespace content {
22 class GLHelper; 23 class GLHelper;
23 class GLContextLostListener; 24 class GLContextLostListener;
24 25
25 class ImageTransportFactoryAndroidObserver { 26 class ImageTransportFactoryAndroidObserver {
26 public: 27 public:
27 virtual ~ImageTransportFactoryAndroidObserver() {} 28 virtual ~ImageTransportFactoryAndroidObserver() {}
28 virtual void OnLostResources() = 0; 29 virtual void OnLostResources() = 0;
29 }; 30 };
30 31
31 class ImageTransportFactoryAndroid { 32 class CONTENT_EXPORT ImageTransportFactoryAndroid {
32 public: 33 public:
33 virtual ~ImageTransportFactoryAndroid(); 34 virtual ~ImageTransportFactoryAndroid();
34 35
36 // Initializes the global transport factory for unit tests.
37 static void InitializeForUnitTests(
38 scoped_ptr<ImageTransportFactoryAndroid> test_factory);
39 // Terminates the global transport factory for unit tests.
40 static void TerminateForUnitTests();
41
35 static ImageTransportFactoryAndroid* GetInstance(); 42 static ImageTransportFactoryAndroid* GetInstance();
36 43
37 virtual GLHelper* GetGLHelper() = 0; 44 virtual GLHelper* GetGLHelper() = 0;
38 virtual uint32 GetChannelID() = 0; 45 virtual uint32 GetChannelID() = 0;
39 46
40 static void AddObserver(ImageTransportFactoryAndroidObserver* observer); 47 static void AddObserver(ImageTransportFactoryAndroidObserver* observer);
41 static void RemoveObserver(ImageTransportFactoryAndroidObserver* observer); 48 static void RemoveObserver(ImageTransportFactoryAndroidObserver* observer);
42 49
43 protected: 50 protected:
44 ImageTransportFactoryAndroid(); 51 ImageTransportFactoryAndroid();
45 52
46 scoped_ptr<GLContextLostListener> context_lost_listener_; 53 scoped_ptr<GLContextLostListener> context_lost_listener_;
47 }; 54 };
48 55
49 } // namespace content 56 } // namespace content
50 57
51 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_ 58 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698