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

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

Issue 2715663007: Implement temporary reference assignment with DisplayCompositor. (Closed)
Patch Set: Rebase + fixes. Created 3 years, 9 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/local_surface_id.h"
18 #include "cc/surfaces/surface_id.h"
17 #include "components/display_compositor/display_compositor_export.h" 19 #include "components/display_compositor/display_compositor_export.h"
18 #include "components/display_compositor/gpu_compositor_frame_sink_delegate.h" 20 #include "components/display_compositor/gpu_compositor_frame_sink_delegate.h"
19 #include "mojo/public/cpp/bindings/binding.h" 21 #include "mojo/public/cpp/bindings/binding.h"
20 22
21 namespace display_compositor { 23 namespace display_compositor {
22 24
23 // Server side representation of a WindowSurface. 25 // Server side representation of a WindowSurface.
24 class DISPLAY_COMPOSITOR_EXPORT GpuCompositorFrameSink 26 class DISPLAY_COMPOSITOR_EXPORT GpuCompositorFrameSink
25 : public NON_EXPORTED_BASE(cc::CompositorFrameSinkSupportClient), 27 : public NON_EXPORTED_BASE(cc::CompositorFrameSinkSupportClient),
26 public NON_EXPORTED_BASE(cc::mojom::MojoCompositorFrameSink), 28 public NON_EXPORTED_BASE(cc::mojom::MojoCompositorFrameSink),
(...skipping 12 matching lines...) Expand all
39 // cc::mojom::MojoCompositorFrameSink: 41 // cc::mojom::MojoCompositorFrameSink:
40 void EvictFrame() override; 42 void EvictFrame() override;
41 void SetNeedsBeginFrame(bool needs_begin_frame) override; 43 void SetNeedsBeginFrame(bool needs_begin_frame) override;
42 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, 44 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id,
43 cc::CompositorFrame frame) override; 45 cc::CompositorFrame frame) override;
44 void Require(const cc::LocalSurfaceId& local_surface_id, 46 void Require(const cc::LocalSurfaceId& local_surface_id,
45 const cc::SurfaceSequence& sequence) override; 47 const cc::SurfaceSequence& sequence) override;
46 void Satisfy(const cc::SurfaceSequence& sequence) override; 48 void Satisfy(const cc::SurfaceSequence& sequence) override;
47 49
48 // cc::mojom::MojoCompositorFrameSinkPrivate: 50 // cc::mojom::MojoCompositorFrameSinkPrivate:
51 void ClaimTemporaryReference(const cc::SurfaceId& surface_id) override;
49 void RequestCopyOfSurface( 52 void RequestCopyOfSurface(
50 std::unique_ptr<cc::CopyOutputRequest> request) override; 53 std::unique_ptr<cc::CopyOutputRequest> request) override;
51 54
52 private: 55 private:
53 // cc::CompositorFrameSinkSupportClient implementation: 56 // cc::CompositorFrameSinkSupportClient implementation:
54 void DidReceiveCompositorFrameAck() override; 57 void DidReceiveCompositorFrameAck() override;
55 void OnBeginFrame(const cc::BeginFrameArgs& args) override; 58 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
56 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; 59 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
57 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id, 60 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id,
58 const gfx::Rect& damage_rect) override; 61 const gfx::Rect& damage_rect) override;
(...skipping 12 matching lines...) Expand all
71 compositor_frame_sink_binding_; 74 compositor_frame_sink_binding_;
72 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> 75 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate>
73 compositor_frame_sink_private_binding_; 76 compositor_frame_sink_private_binding_;
74 77
75 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); 78 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink);
76 }; 79 };
77 80
78 } // namespace display_compositor 81 } // namespace display_compositor
79 82
80 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ 83 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698