| Index: cc/surfaces/surface.h
|
| diff --git a/cc/surfaces/surface.h b/cc/surfaces/surface.h
|
| index b93062105b6bf416eb945dc3e0b182a24dd97e32..6ff5b13946ae024db19d38b9e8c8a4433488b021 100644
|
| --- a/cc/surfaces/surface.h
|
| +++ b/cc/surfaces/surface.h
|
| @@ -19,9 +19,9 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/optional.h"
|
| #include "cc/output/copy_output_request.h"
|
| +#include "cc/surfaces/compositor_frame_sink_support.h"
|
| #include "cc/surfaces/frame_sink_id.h"
|
| #include "cc/surfaces/pending_frame_observer.h"
|
| -#include "cc/surfaces/surface_factory.h"
|
| #include "cc/surfaces/surface_id.h"
|
| #include "cc/surfaces/surface_sequence.h"
|
| #include "cc/surfaces/surfaces_export.h"
|
| @@ -36,13 +36,14 @@ namespace cc {
|
| class BeginFrameSource;
|
| class CompositorFrame;
|
| class CopyOutputRequest;
|
| -class SurfaceFactory;
|
|
|
| class CC_SURFACES_EXPORT Surface {
|
| public:
|
| - using DrawCallback = SurfaceFactory::DrawCallback;
|
| + using DrawCallback = base::Callback<void()>;
|
|
|
| - Surface(const SurfaceId& id, base::WeakPtr<SurfaceFactory> factory);
|
| + Surface(
|
| + const SurfaceId& id,
|
| + base::WeakPtr<CompositorFrameSinkSupport> compositor_frame_sink_support);
|
| ~Surface();
|
|
|
| const SurfaceId& surface_id() const { return surface_id_; }
|
| @@ -86,7 +87,9 @@ class CC_SURFACES_EXPORT Surface {
|
| void TakeLatencyInfo(std::vector<ui::LatencyInfo>* latency_info);
|
| void RunDrawCallbacks();
|
|
|
| - base::WeakPtr<SurfaceFactory> factory() { return factory_; }
|
| + base::WeakPtr<CompositorFrameSinkSupport> compositor_frame_sink_support() {
|
| + return compositor_frame_sink_support_;
|
| + }
|
|
|
| // Add a SurfaceSequence that must be satisfied before the Surface is
|
| // destroyed.
|
| @@ -140,7 +143,7 @@ class CC_SURFACES_EXPORT Surface {
|
|
|
| SurfaceId surface_id_;
|
| SurfaceId previous_frame_surface_id_;
|
| - base::WeakPtr<SurfaceFactory> factory_;
|
| + base::WeakPtr<CompositorFrameSinkSupport> compositor_frame_sink_support_;
|
| // TODO(jamesr): Support multiple frames in flight.
|
| base::Optional<CompositorFrame> pending_frame_;
|
| base::Optional<CompositorFrame> active_frame_;
|
|
|