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

Side by Side Diff: content/browser/compositor/image_transport_factory.h

Issue 2803993003: Introduce FrameSinkManagerHost in content/browser/. (Closed)
Patch Set: Fix android. Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
6 #define CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 17 matching lines...) Expand all
28 namespace display_compositor { 28 namespace display_compositor {
29 class GLHelper; 29 class GLHelper;
30 } 30 }
31 31
32 namespace gpu { 32 namespace gpu {
33 class GpuChannelEstablishFactory; 33 class GpuChannelEstablishFactory;
34 } 34 }
35 35
36 namespace content { 36 namespace content {
37 37
38 class FrameSinkManagerHost;
39
38 // This class provides the interface for creating the support for the 40 // This class provides the interface for creating the support for the
39 // cross-process image transport, both for creating the shared surface handle 41 // cross-process image transport, both for creating the shared surface handle
40 // (destination surface for the GPU process) and the transport client (logic for 42 // (destination surface for the GPU process) and the transport client (logic for
41 // using that surface as a texture). The factory is a process-wide singleton. 43 // using that surface as a texture). The factory is a process-wide singleton.
42 class CONTENT_EXPORT ImageTransportFactory { 44 class CONTENT_EXPORT ImageTransportFactory {
43 public: 45 public:
44 virtual ~ImageTransportFactory() {} 46 virtual ~ImageTransportFactory() {}
45 47
46 // Initializes the global transport factory. 48 // Initializes the global transport factory.
47 static void Initialize(); 49 static void Initialize();
(...skipping 15 matching lines...) Expand all
63 // Gets the image transport factory as the privileged context factory for the 65 // Gets the image transport factory as the privileged context factory for the
64 // compositor. TODO(fsamuel): This interface should eventually go away once 66 // compositor. TODO(fsamuel): This interface should eventually go away once
65 // Mus subsumes this functionality. 67 // Mus subsumes this functionality.
66 virtual ui::ContextFactoryPrivate* GetContextFactoryPrivate() = 0; 68 virtual ui::ContextFactoryPrivate* GetContextFactoryPrivate() = 0;
67 69
68 // Gets a GLHelper instance, associated with the shared context. This 70 // Gets a GLHelper instance, associated with the shared context. This
69 // GLHelper will get destroyed whenever the shared context is lost 71 // GLHelper will get destroyed whenever the shared context is lost
70 // (ImageTransportFactoryObserver::OnLostResources is called). 72 // (ImageTransportFactoryObserver::OnLostResources is called).
71 virtual display_compositor::GLHelper* GetGLHelper() = 0; 73 virtual display_compositor::GLHelper* GetGLHelper() = 0;
72 74
75 // Gets the frame sink manager host instance.
76 virtual FrameSinkManagerHost* GetFrameSinkManagerHost() = 0;
77
73 virtual void SetGpuChannelEstablishFactory( 78 virtual void SetGpuChannelEstablishFactory(
74 gpu::GpuChannelEstablishFactory* factory) = 0; 79 gpu::GpuChannelEstablishFactory* factory) = 0;
75 80
76 #if defined(OS_MACOSX) 81 #if defined(OS_MACOSX)
77 // Called with |suspended| as true when the ui::Compositor has been 82 // Called with |suspended| as true when the ui::Compositor has been
78 // disconnected from an NSView and may be attached to another one. Called 83 // disconnected from an NSView and may be attached to another one. Called
79 // with |suspended| as false after the ui::Compositor has been connected to 84 // with |suspended| as false after the ui::Compositor has been connected to
80 // a new NSView and the first commit targeted at the new NSView has 85 // a new NSView and the first commit targeted at the new NSView has
81 // completed. This ensures that content and frames intended for the old 86 // completed. This ensures that content and frames intended for the old
82 // NSView will not flash in the new NSView. 87 // NSView will not flash in the new NSView.
83 virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor, 88 virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor,
84 bool suspended) = 0; 89 bool suspended) = 0;
85 #endif 90 #endif
86 }; 91 };
87 92
88 } // namespace content 93 } // namespace content
89 94
90 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 95 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | content/browser/compositor/surface_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698