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

Side by Side Diff: components/mus/surfaces/direct_output_surface.h

Issue 1821863002: Hook up ui::Compositor to Display's BeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Display member destruction order Created 4 years, 8 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
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | components/mus/surfaces/direct_output_surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACE_H_ 5 #ifndef COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACE_H_
6 #define COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACE_H_ 6 #define COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACE_H_
7 7
8 #include "cc/output/output_surface.h" 8 #include "cc/output/output_surface.h"
9 #include "cc/scheduler/begin_frame_source.h"
10 #include "components/mus/surfaces/surfaces_context_provider.h"
11 #include "components/mus/surfaces/surfaces_context_provider_delegate.h"
9 12
10 namespace mus { 13 namespace mus {
11 14
12 // An OutputSurface implementation that directly draws and 15 // An OutputSurface implementation that directly draws and
13 // swaps to an actual GL surface. 16 // swaps to an actual GL surface.
14 class DirectOutputSurface : public cc::OutputSurface { 17 class DirectOutputSurface : public cc::OutputSurface,
18 public SurfacesContextProviderDelegate {
15 public: 19 public:
16 explicit DirectOutputSurface( 20 explicit DirectOutputSurface(
17 const scoped_refptr<cc::ContextProvider>& context_provider); 21 scoped_refptr<SurfacesContextProvider> context_provider,
22 base::SingleThreadTaskRunner* task_runner);
18 ~DirectOutputSurface() override; 23 ~DirectOutputSurface() override;
19 24
20 // cc::OutputSurface implementation 25 // cc::OutputSurface implementation
21 bool BindToClient(cc::OutputSurfaceClient* client) override; 26 bool BindToClient(cc::OutputSurfaceClient* client) override;
22 void SwapBuffers(cc::CompositorFrame* frame) override; 27 void SwapBuffers(cc::CompositorFrame* frame) override;
23 28
29 // SurfacesContextProviderDelegate implementation
30 void OnVSyncParametersUpdated(int64_t timebase, int64_t interval) override;
31
24 private: 32 private:
33 scoped_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source_;
25 base::WeakPtrFactory<DirectOutputSurface> weak_ptr_factory_; 34 base::WeakPtrFactory<DirectOutputSurface> weak_ptr_factory_;
26 }; 35 };
27 36
28 } // namespace mus 37 } // namespace mus
29 38
30 #endif // COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACE_H_ 39 #endif // COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | components/mus/surfaces/direct_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698