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

Side by Side Diff: services/ui/public/cpp/compositor_frame_sink.h

Issue 2430653002: Mus+Ash: Towards Unifying CompositorFrameSink terminology (Closed)
Patch Set: Fix bitmap_uploader Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SERVICES_UI_PUBLIC_CPP_COMPOSITOR_FRAME_SINK_H_ 5 #ifndef SERVICES_UI_PUBLIC_CPP_COMPOSITOR_FRAME_SINK_H_
6 #define SERVICES_UI_PUBLIC_CPP_COMPOSITOR_FRAME_SINK_H_ 6 #define SERVICES_UI_PUBLIC_CPP_COMPOSITOR_FRAME_SINK_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "cc/output/compositor_frame_sink.h" 9 #include "cc/output/compositor_frame_sink.h"
10 #include "cc/output/context_provider.h"
10 #include "cc/scheduler/begin_frame_source.h" 11 #include "cc/scheduler/begin_frame_source.h"
11 #include "cc/surfaces/surface_id.h" 12 #include "cc/surfaces/surface_id.h"
12 #include "mojo/public/cpp/bindings/binding.h" 13 #include "mojo/public/cpp/bindings/binding.h"
13 #include "services/ui/public/cpp/window_surface.h" 14 #include "services/ui/public/cpp/window_surface.h"
14 #include "services/ui/public/cpp/window_surface_client.h" 15 #include "services/ui/public/cpp/window_surface_client.h"
15 16
16 namespace gpu { 17 namespace gpu {
17 class GpuChannelHost; 18 class GpuChannelHost;
18 } 19 }
19 20
20 namespace ui { 21 namespace ui {
21 22
22 class CompositorFrameSink : public cc::CompositorFrameSink, 23 class CompositorFrameSink : public cc::CompositorFrameSink,
23 public WindowSurfaceClient { 24 public WindowSurfaceClient {
24 public: 25 public:
25 CompositorFrameSink(scoped_refptr<gpu::GpuChannelHost> gpu_channel_host, 26 CompositorFrameSink(scoped_refptr<cc::ContextProvider> context_provider,
26 std::unique_ptr<WindowSurface> surface); 27 std::unique_ptr<WindowSurface> surface);
27 ~CompositorFrameSink() override; 28 ~CompositorFrameSink() override;
28 29
29 // cc::CompositorFrameSink implementation. 30 // cc::CompositorFrameSink implementation.
30 bool BindToClient(cc::CompositorFrameSinkClient* client) override; 31 bool BindToClient(cc::CompositorFrameSinkClient* client) override;
31 void DetachFromClient() override; 32 void DetachFromClient() override;
32 void SubmitCompositorFrame(cc::CompositorFrame frame) override; 33 void SubmitCompositorFrame(cc::CompositorFrame frame) override;
33 34
34 private: 35 private:
35 // WindowSurfaceClient implementation: 36 // WindowSurfaceClient implementation:
36 void OnResourcesReturned(WindowSurface* surface, 37 void DidReceiveCompositorFrameAck() override;
37 const cc::ReturnedResourceArray& resources) override; 38 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
38 39
39 std::unique_ptr<cc::BeginFrameSource> begin_frame_source_; 40 std::unique_ptr<cc::BeginFrameSource> begin_frame_source_;
40 std::unique_ptr<WindowSurface> surface_; 41 std::unique_ptr<WindowSurface> surface_;
41 42
42 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSink); 43 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSink);
43 }; 44 };
44 45
45 } // namespace ui 46 } // namespace ui
46 47
47 #endif // SERVICES_UI_PUBLIC_CPP_COMPOSITOR_FRAME_SINK_H_ 48 #endif // SERVICES_UI_PUBLIC_CPP_COMPOSITOR_FRAME_SINK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698