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

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: android unittests build fix 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 ImageTransportFactoryAndroid* test_factory);
39
35 static ImageTransportFactoryAndroid* GetInstance(); 40 static ImageTransportFactoryAndroid* GetInstance();
36 41
37 virtual GLHelper* GetGLHelper() = 0; 42 virtual GLHelper* GetGLHelper() = 0;
38 virtual uint32 GetChannelID() = 0; 43 virtual uint32 GetChannelID() = 0;
39 44
40 static void AddObserver(ImageTransportFactoryAndroidObserver* observer); 45 static void AddObserver(ImageTransportFactoryAndroidObserver* observer);
41 static void RemoveObserver(ImageTransportFactoryAndroidObserver* observer); 46 static void RemoveObserver(ImageTransportFactoryAndroidObserver* observer);
42 47
43 protected: 48 protected:
44 ImageTransportFactoryAndroid(); 49 ImageTransportFactoryAndroid();
45 50
46 scoped_ptr<GLContextLostListener> context_lost_listener_; 51 scoped_ptr<GLContextLostListener> context_lost_listener_;
47 }; 52 };
48 53
49 } // namespace content 54 } // namespace content
50 55
51 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_ 56 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698