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

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

Issue 2197613003: gpu: Introduce GpuChannelEstablishFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot merge Created 4 years, 4 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 18 matching lines...) Expand all
29 class Compositor; 29 class Compositor;
30 class ContextFactory; 30 class ContextFactory;
31 class ContextFactoryObserver; 31 class ContextFactoryObserver;
32 class Texture; 32 class Texture;
33 } 33 }
34 34
35 namespace display_compositor { 35 namespace display_compositor {
36 class GLHelper; 36 class GLHelper;
37 } 37 }
38 38
39 namespace gpu {
40 class GpuChannelEstablishFactory;
41 }
42
39 namespace content { 43 namespace content {
40 44
41 // This class provides the interface for creating the support for the 45 // This class provides the interface for creating the support for the
42 // cross-process image transport, both for creating the shared surface handle 46 // cross-process image transport, both for creating the shared surface handle
43 // (destination surface for the GPU process) and the transport client (logic for 47 // (destination surface for the GPU process) and the transport client (logic for
44 // using that surface as a texture). The factory is a process-wide singleton. 48 // using that surface as a texture). The factory is a process-wide singleton.
45 class CONTENT_EXPORT ImageTransportFactory { 49 class CONTENT_EXPORT ImageTransportFactory {
46 public: 50 public:
47 virtual ~ImageTransportFactory() {} 51 virtual ~ImageTransportFactory() {}
48 52
(...skipping 14 matching lines...) Expand all
63 // Gets the image transport factory as a context factory for the compositor. 67 // Gets the image transport factory as a context factory for the compositor.
64 virtual ui::ContextFactory* GetContextFactory() = 0; 68 virtual ui::ContextFactory* GetContextFactory() = 0;
65 69
66 virtual cc::SurfaceManager* GetSurfaceManager() = 0; 70 virtual cc::SurfaceManager* GetSurfaceManager() = 0;
67 71
68 // Gets a GLHelper instance, associated with the shared context. This 72 // Gets a GLHelper instance, associated with the shared context. This
69 // GLHelper will get destroyed whenever the shared context is lost 73 // GLHelper will get destroyed whenever the shared context is lost
70 // (ImageTransportFactoryObserver::OnLostResources is called). 74 // (ImageTransportFactoryObserver::OnLostResources is called).
71 virtual display_compositor::GLHelper* GetGLHelper() = 0; 75 virtual display_compositor::GLHelper* GetGLHelper() = 0;
72 76
77 virtual void SetGpuChannelEstablishFactory(
78 gpu::GpuChannelEstablishFactory* factory) = 0;
79
73 #if defined(OS_MACOSX) 80 #if defined(OS_MACOSX)
74 // Called with |suspended| as true when the ui::Compositor has been 81 // Called with |suspended| as true when the ui::Compositor has been
75 // disconnected from an NSView and may be attached to another one. Called 82 // disconnected from an NSView and may be attached to another one. Called
76 // with |suspended| as false after the ui::Compositor has been connected to 83 // with |suspended| as false after the ui::Compositor has been connected to
77 // a new NSView and the first commit targeted at the new NSView has 84 // a new NSView and the first commit targeted at the new NSView has
78 // completed. This ensures that content and frames intended for the old 85 // completed. This ensures that content and frames intended for the old
79 // NSView will not flash in the new NSView. 86 // NSView will not flash in the new NSView.
80 virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor, 87 virtual void SetCompositorSuspendedForRecycle(ui::Compositor* compositor,
81 bool suspended) = 0; 88 bool suspended) = 0;
82 #endif 89 #endif
83 }; 90 };
84 91
85 } // namespace content 92 } // namespace content
86 93
87 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ 94 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698