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

Unified Diff: services/ui/public/cpp/output_surface.cc

Issue 2260943002: Move default begin frame sources out to mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert SingleThreadProxy changes Created 4 years, 4 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
« no previous file with comments | « services/ui/public/cpp/output_surface.h ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/output_surface.cc
diff --git a/services/ui/public/cpp/output_surface.cc b/services/ui/public/cpp/output_surface.cc
index ddaaaa4c70b7f7be87b2f92da7b099d110ad3266..1309de242787c4248cda0dd39102953de5794d22 100644
--- a/services/ui/public/cpp/output_surface.cc
+++ b/services/ui/public/cpp/output_surface.cc
@@ -9,6 +9,7 @@
#include "cc/output/output_surface_client.h"
#include "gpu/ipc/client/gpu_channel_host.h"
#include "services/ui/public/cpp/context_provider.h"
+#include "services/ui/public/cpp/gpu_service.h"
#include "services/ui/public/cpp/window_surface.h"
namespace ui {
@@ -29,10 +30,19 @@ OutputSurface::~OutputSurface() {}
bool OutputSurface::BindToClient(cc::OutputSurfaceClient* client) {
surface_->BindToThread();
surface_->set_client(this);
+
+ // TODO(enne): Get this from the WindowSurface via ServerWindowSurface.
+ begin_frame_source_.reset(new cc::DelayBasedBeginFrameSource(
+ base::MakeUnique<cc::DelayBasedTimeSource>(
+ base::ThreadTaskRunnerHandle::Get().get())));
+
+ client->SetBeginFrameSource(begin_frame_source_.get());
return cc::OutputSurface::BindToClient(client);
}
void OutputSurface::DetachFromClient() {
+ client_->SetBeginFrameSource(nullptr);
+ begin_frame_source_.reset();
surface_.reset();
cc::OutputSurface::DetachFromClient();
}
« no previous file with comments | « services/ui/public/cpp/output_surface.h ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698