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

Unified 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: Rebase; refactor mus output surface Created 4 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 side-by-side diff with in-line comments
Download patch
Index: components/mus/surfaces/direct_output_surface.h
diff --git a/components/mus/surfaces/direct_output_surface.h b/components/mus/surfaces/direct_output_surface.h
index b32d0cdd85aa3b960e88d1431bd2ad984ad613a7..73c6e8adfb97377ffa61c12fdb73a5279295b125 100644
--- a/components/mus/surfaces/direct_output_surface.h
+++ b/components/mus/surfaces/direct_output_surface.h
@@ -6,22 +6,31 @@
#define COMPONENTS_MUS_SURFACES_DIRECT_OUTPUT_SURFACE_H_
#include "cc/output/output_surface.h"
+#include "cc/scheduler/begin_frame_source.h"
+#include "components/mus/surfaces/surfaces_context_provider.h"
+#include "components/mus/surfaces/surfaces_context_provider_delegate.h"
namespace mus {
// An OutputSurface implementation that directly draws and
// swaps to an actual GL surface.
-class DirectOutputSurface : public cc::OutputSurface {
+class DirectOutputSurface : public cc::OutputSurface,
+ public SurfacesContextProviderDelegate {
public:
explicit DirectOutputSurface(
- const scoped_refptr<cc::ContextProvider>& context_provider);
+ scoped_refptr<SurfacesContextProvider> context_provider,
+ base::SingleThreadTaskRunner* task_runner);
~DirectOutputSurface() override;
// cc::OutputSurface implementation
bool BindToClient(cc::OutputSurfaceClient* client) override;
void SwapBuffers(cc::CompositorFrame* frame) override;
+ // SurfacesContextProviderDelegate implementation
+ void OnVSyncParametersUpdated(int64_t timebase, int64_t interval) override;
+
private:
+ scoped_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source_;
base::WeakPtrFactory<DirectOutputSurface> weak_ptr_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698