| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ | 5 #ifndef COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ |
| 6 #define COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ | 6 #define COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "cc/ipc/display_compositor.mojom.h" | 13 #include "cc/ipc/display_compositor.mojom.h" |
| 14 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" | 14 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" |
| 15 #include "cc/surfaces/compositor_frame_sink_support.h" | 15 #include "cc/surfaces/compositor_frame_sink_support.h" |
| 16 #include "cc/surfaces/compositor_frame_sink_support_client.h" | 16 #include "cc/surfaces/compositor_frame_sink_support_client.h" |
| 17 #include "cc/surfaces/referenced_surface_tracker.h" | |
| 18 #include "components/display_compositor/display_compositor_export.h" | 17 #include "components/display_compositor/display_compositor_export.h" |
| 19 #include "components/display_compositor/gpu_compositor_frame_sink_delegate.h" | 18 #include "components/display_compositor/gpu_compositor_frame_sink_delegate.h" |
| 20 #include "mojo/public/cpp/bindings/binding.h" | 19 #include "mojo/public/cpp/bindings/binding.h" |
| 21 | 20 |
| 22 namespace cc { | 21 namespace cc { |
| 23 class Display; | 22 class Display; |
| 24 } | 23 } |
| 25 | 24 |
| 26 namespace display_compositor { | 25 namespace display_compositor { |
| 27 | 26 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 cc::CompositorFrameSinkSupport support_; | 63 cc::CompositorFrameSinkSupport support_; |
| 65 cc::SurfaceManager* const surface_manager_; | 64 cc::SurfaceManager* const surface_manager_; |
| 66 | 65 |
| 67 private: | 66 private: |
| 68 // cc::CompositorFrameSinkSupportClient implementation: | 67 // cc::CompositorFrameSinkSupportClient implementation: |
| 69 void DidReceiveCompositorFrameAck() override; | 68 void DidReceiveCompositorFrameAck() override; |
| 70 void OnBeginFrame(const cc::BeginFrameArgs& args) override; | 69 void OnBeginFrame(const cc::BeginFrameArgs& args) override; |
| 71 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; | 70 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; |
| 72 void WillDrawSurface() override; | 71 void WillDrawSurface() override; |
| 73 | 72 |
| 74 // Track the surface references for the surface corresponding to this | |
| 75 // compositor frame sink. | |
| 76 cc::ReferencedSurfaceTracker surface_tracker_; | |
| 77 | 73 |
| 78 bool client_connection_lost_ = false; | 74 bool client_connection_lost_ = false; |
| 79 bool private_connection_lost_ = false; | 75 bool private_connection_lost_ = false; |
| 80 | 76 |
| 81 cc::mojom::MojoCompositorFrameSinkClientPtr client_; | 77 cc::mojom::MojoCompositorFrameSinkClientPtr client_; |
| 82 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> | 78 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> |
| 83 compositor_frame_sink_private_binding_; | 79 compositor_frame_sink_private_binding_; |
| 84 | 80 |
| 85 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); | 81 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); |
| 86 }; | 82 }; |
| 87 | 83 |
| 88 } // namespace display_compositor | 84 } // namespace display_compositor |
| 89 | 85 |
| 90 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ | 86 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ |
| OLD | NEW |