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

Side by Side Diff: services/surfaces/display_impl.h

Issue 1534693002: Delete the Surfaces service. (Closed) Base URL: git@github.com:domokit/mojo.git@cl-2d
Patch Set: rebase Created 5 years 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
« no previous file with comments | « services/surfaces/display_factory_impl.cc ('k') | services/surfaces/display_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_SURFACES_DISPLAY_IMPL_H_
6 #define SERVICES_SURFACES_DISPLAY_IMPL_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/surfaces/display_client.h"
10 #include "cc/surfaces/surface_factory.h"
11 #include "cc/surfaces/surface_factory_client.h"
12 #include "mojo/public/cpp/bindings/strong_binding.h"
13 #include "mojo/services/surfaces/interfaces/display.mojom.h"
14
15 namespace cc {
16 class Display;
17 class SurfaceFactory;
18 }
19
20 namespace surfaces {
21 class SurfacesScheduler;
22
23 class DisplayImpl : public mojo::Display,
24 public mojo::ViewportParameterListener,
25 public cc::DisplayClient,
26 public cc::SurfaceFactoryClient {
27 public:
28 DisplayImpl(cc::SurfaceManager* manager,
29 cc::SurfaceId cc_id,
30 SurfacesScheduler* scheduler,
31 mojo::ContextProviderPtr context_provider,
32 mojo::ResourceReturnerPtr returner,
33 mojo::InterfaceRequest<mojo::Display> display_request);
34 ~DisplayImpl() override;
35
36 private:
37 void OnContextCreated(mojo::CommandBufferPtr gles2_client);
38
39 // mojo::Display implementation:
40 void SubmitFrame(mojo::FramePtr frame,
41 const SubmitFrameCallback& callback) override;
42
43 // DisplayClient implementation.
44 void DisplayDamaged() override;
45 void DidSwapBuffers() override;
46 void DidSwapBuffersComplete() override;
47 void CommitVSyncParameters(base::TimeTicks timebase,
48 base::TimeDelta interval) override;
49 void OutputSurfaceLost() override;
50
51 // ViewportParameterListener
52 void OnVSyncParametersUpdated(int64_t timebase, int64_t interval) override;
53
54 // SurfaceFactoryClient implementation.
55 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
56
57 void Draw();
58
59 cc::SurfaceManager* manager_;
60 cc::SurfaceFactory factory_;
61 cc::SurfaceId cc_id_;
62 SurfacesScheduler* scheduler_;
63 mojo::ContextProviderPtr context_provider_;
64 mojo::ResourceReturnerPtr returner_;
65
66 gfx::Size last_submitted_frame_size_;
67 mojo::FramePtr pending_frame_;
68 SubmitFrameCallback pending_callback_;
69
70 scoped_ptr<cc::Display> display_;
71
72 mojo::Binding<mojo::ViewportParameterListener> viewport_param_binding_;
73 mojo::StrongBinding<mojo::Display> display_binding_;
74
75 DISALLOW_COPY_AND_ASSIGN(DisplayImpl);
76 };
77
78 } // namespace surfaces
79
80 #endif // SERVICES_SURFACES_DISPLAY_IMPL_H_
OLDNEW
« no previous file with comments | « services/surfaces/display_factory_impl.cc ('k') | services/surfaces/display_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698