Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: components/display_compositor/gpu_compositor_frame_sink.h

Issue 2683953004: Revert of Move surface reference code to CompositorFrameSinkSupport. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
17 #include "components/display_compositor/display_compositor_export.h" 18 #include "components/display_compositor/display_compositor_export.h"
18 #include "components/display_compositor/gpu_compositor_frame_sink_delegate.h" 19 #include "components/display_compositor/gpu_compositor_frame_sink_delegate.h"
19 #include "mojo/public/cpp/bindings/binding.h" 20 #include "mojo/public/cpp/bindings/binding.h"
20 21
21 namespace cc { 22 namespace cc {
22 class Display; 23 class Display;
23 } 24 }
24 25
25 namespace display_compositor { 26 namespace display_compositor {
26 27
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 cc::CompositorFrameSinkSupport support_; 63 cc::CompositorFrameSinkSupport support_;
63 cc::SurfaceManager* const surface_manager_; 64 cc::SurfaceManager* const surface_manager_;
64 65
65 private: 66 private:
66 // cc::CompositorFrameSinkSupportClient implementation: 67 // cc::CompositorFrameSinkSupportClient implementation:
67 void DidReceiveCompositorFrameAck() override; 68 void DidReceiveCompositorFrameAck() override;
68 void OnBeginFrame(const cc::BeginFrameArgs& args) override; 69 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
69 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; 70 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
70 void WillDrawSurface() override; 71 void WillDrawSurface() override;
71 72
73 // Track the surface references for the surface corresponding to this
74 // compositor frame sink.
75 cc::ReferencedSurfaceTracker surface_tracker_;
72 76
73 bool client_connection_lost_ = false; 77 bool client_connection_lost_ = false;
74 bool private_connection_lost_ = false; 78 bool private_connection_lost_ = false;
75 79
76 cc::mojom::MojoCompositorFrameSinkClientPtr client_; 80 cc::mojom::MojoCompositorFrameSinkClientPtr client_;
77 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> 81 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate>
78 compositor_frame_sink_private_binding_; 82 compositor_frame_sink_private_binding_;
79 83
80 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); 84 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink);
81 }; 85 };
82 86
83 } // namespace display_compositor 87 } // namespace display_compositor
84 88
85 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ 89 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_manager.h ('k') | components/display_compositor/gpu_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698