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

Unified Diff: components/mus/surfaces/direct_output_surface.cc

Issue 2029323004: Get rid of virtual Display::CreateScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onscreendisplayclient
Patch Set: displaytest: androids Created 4 years, 7 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.cc
diff --git a/components/mus/surfaces/direct_output_surface.cc b/components/mus/surfaces/direct_output_surface.cc
index 09e17003ec3ec19b0baf4ed56ba9c6ba9b58bba9..21158360f87cdd7898f61ff4277cac1a3dede91a 100644
--- a/components/mus/surfaces/direct_output_surface.cc
+++ b/components/mus/surfaces/direct_output_surface.cc
@@ -10,6 +10,7 @@
#include "cc/output/compositor_frame.h"
#include "cc/output/context_provider.h"
#include "cc/output/output_surface_client.h"
+#include "cc/scheduler/begin_frame_source.h"
#include "gpu/command_buffer/client/context_support.h"
#include "gpu/command_buffer/client/gles2_interface.h"
@@ -17,23 +18,19 @@ namespace mus {
DirectOutputSurface::DirectOutputSurface(
scoped_refptr<SurfacesContextProvider> context_provider,
- base::SingleThreadTaskRunner* task_runner)
+ cc::SyntheticBeginFrameSource* synthetic_begin_frame_source)
: cc::OutputSurface(context_provider, nullptr, nullptr),
- synthetic_begin_frame_source_(new cc::SyntheticBeginFrameSource(
- task_runner,
- cc::BeginFrameArgs::DefaultInterval())),
+ synthetic_begin_frame_source_(synthetic_begin_frame_source),
weak_ptr_factory_(this) {
context_provider->SetDelegate(this);
}
-DirectOutputSurface::~DirectOutputSurface() {}
+DirectOutputSurface::~DirectOutputSurface() = default;
bool DirectOutputSurface::BindToClient(cc::OutputSurfaceClient* client) {
if (!cc::OutputSurface::BindToClient(client))
return false;
- client->SetBeginFrameSource(synthetic_begin_frame_source_.get());
-
if (capabilities_.uses_default_gl_framebuffer) {
capabilities_.flipped_output_surface =
context_provider()->ContextCapabilities().flips_vertically;

Powered by Google App Engine
This is Rietveld 408576698