Chromium Code Reviews| Index: cc/surfaces/surface.h |
| diff --git a/cc/surfaces/surface.h b/cc/surfaces/surface.h |
| index 603036fe90e069fe4f8203e81c2944e0f4e66721..ffafa3b340dd296fefec32f9e1fa6b34ef1c2679 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" |
| @@ -35,14 +35,16 @@ namespace cc { |
| class CompositorFrame; |
| class CopyOutputRequest; |
| -class SurfaceFactory; |
| class CC_SURFACES_EXPORT Surface { |
| public: |
| - using DrawCallback = SurfaceFactory::DrawCallback; |
| - using WillDrawCallback = SurfaceFactory::WillDrawCallback; |
| + using DrawCallback = base::Callback<void()>; |
|
danakj
2017/05/03 16:08:39
this is written base::Closure
Alex Z.
2017/05/03 18:07:37
Done.
danakj
2017/05/05 16:04:19
FWIW I was okay with the typedef, but I mean Callb
|
| + using WillDrawCallback = |
| + base::RepeatingCallback<void(const LocalSurfaceId&, const gfx::Rect&)>; |
| - 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_; } |
| @@ -93,7 +95,9 @@ class CC_SURFACES_EXPORT Surface { |
| void RunDrawCallback(); |
| void RunWillDrawCallback(const gfx::Rect& damage_rect); |
| - 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. |
| @@ -155,7 +159,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_; |
| base::Optional<FrameData> pending_frame_data_; |
| base::Optional<FrameData> active_frame_data_; |