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

Side by Side Diff: services/ui/public/cpp/window_compositor_frame_sink.cc

Issue 2544103002: Added MojoCompositorFrameSink::EvictFrame() and MojoCompositorFrameSinkClient::WillDrawSurface() (Closed)
Patch Set: Addressed a comment Created 4 years 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
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 #include "services/ui/public/cpp/window_compositor_frame_sink.h" 5 #include "services/ui/public/cpp/window_compositor_frame_sink.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/output/compositor_frame_sink_client.h" 9 #include "cc/output/compositor_frame_sink_client.h"
10 #include "gpu/ipc/client/gpu_channel_host.h" 10 #include "gpu/ipc/client/gpu_channel_host.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 void WindowCompositorFrameSink::ReclaimResources( 107 void WindowCompositorFrameSink::ReclaimResources(
108 const cc::ReturnedResourceArray& resources) { 108 const cc::ReturnedResourceArray& resources) {
109 DCHECK(thread_checker_); 109 DCHECK(thread_checker_);
110 DCHECK(thread_checker_->CalledOnValidThread()); 110 DCHECK(thread_checker_->CalledOnValidThread());
111 if (!client_) 111 if (!client_)
112 return; 112 return;
113 client_->ReclaimResources(resources); 113 client_->ReclaimResources(resources);
114 } 114 }
115 115
116 void WindowCompositorFrameSink::WillDrawSurface() {
117 // TODO(fsamuel, staraz): Implement this.
118 NOTIMPLEMENTED();
119 }
120
116 void WindowCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) { 121 void WindowCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) {
117 compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames); 122 compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames);
118 } 123 }
119 124
120 WindowCompositorFrameSinkBinding::~WindowCompositorFrameSinkBinding() {} 125 WindowCompositorFrameSinkBinding::~WindowCompositorFrameSinkBinding() {}
121 126
122 WindowCompositorFrameSinkBinding::WindowCompositorFrameSinkBinding( 127 WindowCompositorFrameSinkBinding::WindowCompositorFrameSinkBinding(
123 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink_request, 128 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink_request,
124 mojo::InterfacePtrInfo<cc::mojom::MojoCompositorFrameSinkClient> 129 mojo::InterfacePtrInfo<cc::mojom::MojoCompositorFrameSinkClient>
125 compositor_frame_sink_client) 130 compositor_frame_sink_client)
126 : compositor_frame_sink_request_(std::move(compositor_frame_sink_request)), 131 : compositor_frame_sink_request_(std::move(compositor_frame_sink_request)),
127 compositor_frame_sink_client_(std::move(compositor_frame_sink_client)) {} 132 compositor_frame_sink_client_(std::move(compositor_frame_sink_client)) {}
128 133
129 } // namespace ui 134 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698