| Index: cc/output/compositor_frame_sink.h
|
| diff --git a/cc/output/output_surface.h b/cc/output/compositor_frame_sink.h
|
| similarity index 84%
|
| copy from cc/output/output_surface.h
|
| copy to cc/output/compositor_frame_sink.h
|
| index bf5357b4b2d86ef02b44e74d3f8ff247a6b02066..32b22f98c1bb1289b3d95b154981a0046678c9f3 100644
|
| --- a/cc/output/output_surface.h
|
| +++ b/cc/output/compositor_frame_sink.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CC_OUTPUT_OUTPUT_SURFACE_H_
|
| -#define CC_OUTPUT_OUTPUT_SURFACE_H_
|
| +#ifndef CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_
|
| +#define CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_
|
|
|
| #include <deque>
|
| #include <memory>
|
| @@ -37,7 +37,7 @@ namespace cc {
|
|
|
| class CompositorFrame;
|
| struct ManagedMemoryPolicy;
|
| -class OutputSurfaceClient;
|
| +class CompositorFrameSinkClient;
|
|
|
| // Represents the output surface for a compositor. The compositor owns
|
| // and manages its destruction. Its lifetime is:
|
| @@ -46,18 +46,20 @@ class OutputSurfaceClient;
|
| // From here on, it will only be used on the compositor thread.
|
| // 3. If the 3D context is lost, then the compositor will delete the output
|
| // surface (on the compositor thread) and go back to step 1.
|
| -class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
|
| +class CC_EXPORT CompositorFrameSink
|
| + : public base::trace_event::MemoryDumpProvider {
|
| public:
|
| // Constructor for GL-based and/or software compositing.
|
| - explicit OutputSurface(scoped_refptr<ContextProvider> context_provider,
|
| - scoped_refptr<ContextProvider> worker_context_provider,
|
| - std::unique_ptr<SoftwareOutputDevice> software_device);
|
| + explicit CompositorFrameSink(
|
| + scoped_refptr<ContextProvider> context_provider,
|
| + scoped_refptr<ContextProvider> worker_context_provider,
|
| + std::unique_ptr<SoftwareOutputDevice> software_device);
|
|
|
| // Constructor for Vulkan-based compositing.
|
| - explicit OutputSurface(
|
| + explicit CompositorFrameSink(
|
| scoped_refptr<VulkanContextProvider> vulkan_context_provider);
|
|
|
| - ~OutputSurface() override;
|
| + ~CompositorFrameSink() override;
|
|
|
| struct Capabilities {
|
| Capabilities()
|
| @@ -65,7 +67,7 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
|
| max_frames_pending(1),
|
| adjust_deadline_for_parent(true),
|
| uses_default_gl_framebuffer(true),
|
| - flipped_output_surface(false),
|
| + flipped_compositor_frame_sink(false),
|
| can_force_reclaim_resources(false),
|
| delegated_sync_points_required(true) {}
|
| bool delegated_rendering;
|
| @@ -76,10 +78,10 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
|
| // Whether this output surface renders to the default OpenGL zero
|
| // framebuffer or to an offscreen framebuffer.
|
| bool uses_default_gl_framebuffer;
|
| - // Whether this OutputSurface is flipped or not.
|
| - bool flipped_output_surface;
|
| + // Whether this CompositorFrameSink is flipped or not.
|
| + bool flipped_compositor_frame_sink;
|
| // Whether ForceReclaimResources can be called to reclaim all resources
|
| - // from the OutputSurface.
|
| + // from the CompositorFrameSink.
|
| bool can_force_reclaim_resources;
|
| // True if sync points for resources are needed when swapping delegated
|
| // frames.
|
| @@ -135,7 +137,7 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
|
|
|
| // Support for a pull-model where draws are requested by the output surface.
|
| //
|
| - // OutputSurface::Invalidate is called by the compositor to notify that
|
| + // CompositorFrameSink::Invalidate is called by the compositor to notify that
|
| // there's new content.
|
| virtual void Invalidate() {}
|
|
|
| @@ -146,9 +148,9 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
|
| // this point to when DetachFromClient() is called the output surface will
|
| // only be used on the compositor thread.
|
| // The caller should call DetachFromClient() on the same thread before
|
| - // destroying the OutputSurface, even if this fails. And BindToClient should
|
| - // not be called twice for a given OutputSurface.
|
| - virtual bool BindToClient(OutputSurfaceClient* client);
|
| + // destroying the CompositorFrameSink, even if this fails. And BindToClient
|
| + // should not be called twice for a given CompositorFrameSink.
|
| + virtual bool BindToClient(CompositorFrameSinkClient* client);
|
|
|
| // Called by the compositor on the compositor thread. This is a place where
|
| // thread-specific data for the output surface can be uninitialized.
|
| @@ -192,12 +194,12 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
|
| // is the one listening for context loss. Also used internally for the
|
| // context provider to inform the LayerTreeHostImpl or Display about loss.
|
| // It would become display-compositor-only when LayerTreeHostImpl receives
|
| - // its contexts independently from the "OutputSurface".
|
| - virtual void DidLoseOutputSurface();
|
| + // its contexts independently from the "CompositorFrameSink".
|
| + virtual void DidLoseCompositorFrameSink();
|
|
|
| - OutputSurfaceClient* client_ = nullptr;
|
| + CompositorFrameSinkClient* client_ = nullptr;
|
|
|
| - struct OutputSurface::Capabilities capabilities_;
|
| + struct CompositorFrameSink::Capabilities capabilities_;
|
| scoped_refptr<ContextProvider> context_provider_;
|
| scoped_refptr<ContextProvider> worker_context_provider_;
|
| scoped_refptr<VulkanContextProvider> vulkan_context_provider_;
|
| @@ -212,11 +214,11 @@ class CC_EXPORT OutputSurface : public base::trace_event::MemoryDumpProvider {
|
| private:
|
| void DetachFromClientInternal();
|
|
|
| - base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
|
| + base::WeakPtrFactory<CompositorFrameSink> weak_ptr_factory_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(OutputSurface);
|
| + DISALLOW_COPY_AND_ASSIGN(CompositorFrameSink);
|
| };
|
|
|
| } // namespace cc
|
|
|
| -#endif // CC_OUTPUT_OUTPUT_SURFACE_H_
|
| +#endif // CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_
|
|
|