| Index: content/browser/aura/image_transport_factory.h
|
| diff --git a/content/browser/aura/image_transport_factory.h b/content/browser/aura/image_transport_factory.h
|
| index 85fba7d53004126a82dd3d6bca490a024c545ff1..770002f4ec971b240a8fc9b79e608bad7f0228b9 100644
|
| --- a/content/browser/aura/image_transport_factory.h
|
| +++ b/content/browser/aura/image_transport_factory.h
|
| @@ -8,6 +8,7 @@
|
| #include <string>
|
|
|
| #include "base/memory/ref_counted.h"
|
| +#include "content/common/gpu/surface_capturer.h"
|
| #include "ui/gfx/native_widget_types.h"
|
|
|
| namespace gfx {
|
| @@ -15,6 +16,7 @@ class Size;
|
| }
|
|
|
| namespace ui {
|
| +class Compositor;
|
| class ContextFactory;
|
| class Texture;
|
| }
|
| @@ -40,6 +42,21 @@ class ImageTransportFactoryObserver {
|
| virtual void OnLostResources() = 0;
|
| };
|
|
|
| +// This class provides the interface for creating a ui::ContextFactory that
|
| +// supports creation of a SurfaceCapturer that captures the output of a given
|
| +// ui::Compositor. The factory instance is retrieved from the
|
| +// ImageTransportFactory.
|
| +class SurfaceCapturingContextFactory {
|
| + public:
|
| + virtual ~SurfaceCapturingContextFactory() {}
|
| +
|
| + // Creates a SurfaceCapturer that captures frames from the given compositor's
|
| + // current output surface.
|
| + virtual scoped_ptr<SurfaceCapturer> CreateOutputSurfaceCapturer(
|
| + ui::Compositor* compositor,
|
| + SurfaceCapturer::Client* client) = 0;
|
| +};
|
| +
|
| // This class provides the interface for creating the support for the
|
| // cross-process image transport, both for creating the shared surface handle
|
| // (destination surface for the GPU process) and the transport client (logic for
|
| @@ -60,6 +77,11 @@ class ImageTransportFactory {
|
| // Gets the image transport factory as a context factory for the compositor.
|
| virtual ui::ContextFactory* AsContextFactory() = 0;
|
|
|
| + // Gets the image transport factory as a surface capturer factory for the
|
| + // compositor.
|
| + virtual SurfaceCapturingContextFactory*
|
| + AsSurfaceCapturingContextFactory() = 0;
|
| +
|
| // Creates a shared surface handle.
|
| // Note: the handle may get lost at any time, a state that an
|
| // ImageTransportFactoryObserver gets notified of.
|
|
|