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

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

Issue 2429173005: Mus+Ash: Replace (Server)WindowSurface with (Server)WindowCompositorFrameSink (Closed)
Patch Set: Rebased Created 4 years, 2 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/compositor_frame_sink.h ('k') | services/ui/public/cpp/tests/test_window_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/compositor_frame_sink.cc
diff --git a/services/ui/public/cpp/compositor_frame_sink.cc b/services/ui/public/cpp/compositor_frame_sink.cc
deleted file mode 100644
index ac0aed38a89b7bd3071a06f08ded7cd21d2142a6..0000000000000000000000000000000000000000
--- a/services/ui/public/cpp/compositor_frame_sink.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "services/ui/public/cpp/compositor_frame_sink.h"
-
-#include "base/bind.h"
-#include "cc/output/compositor_frame.h"
-#include "cc/output/compositor_frame_sink_client.h"
-#include "gpu/ipc/client/gpu_channel_host.h"
-#include "services/ui/public/cpp/gpu_service.h"
-#include "services/ui/public/cpp/window_surface.h"
-
-namespace ui {
-
-CompositorFrameSink::CompositorFrameSink(
- scoped_refptr<cc::ContextProvider> context_provider,
- std::unique_ptr<ui::WindowSurface> surface)
- : cc::CompositorFrameSink(std::move(context_provider), nullptr),
- surface_(std::move(surface)) {}
-
-CompositorFrameSink::~CompositorFrameSink() {}
-
-bool CompositorFrameSink::BindToClient(cc::CompositorFrameSinkClient* client) {
- if (!cc::CompositorFrameSink::BindToClient(client))
- return false;
-
- 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 true;
-}
-
-void CompositorFrameSink::DetachFromClient() {
- client_->SetBeginFrameSource(nullptr);
- begin_frame_source_.reset();
- surface_.reset();
- cc::CompositorFrameSink::DetachFromClient();
-}
-
-void CompositorFrameSink::SubmitCompositorFrame(cc::CompositorFrame frame) {
- surface_->SubmitCompositorFrame(std::move(frame));
-}
-
-void CompositorFrameSink::DidReceiveCompositorFrameAck() {
- client_->DidReceiveCompositorFrameAck();
-}
-
-void CompositorFrameSink::ReclaimResources(
- const cc::ReturnedResourceArray& resources) {
- client_->ReclaimResources(resources);
-}
-
-} // namespace ui
« no previous file with comments | « services/ui/public/cpp/compositor_frame_sink.h ('k') | services/ui/public/cpp/tests/test_window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698