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

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

Issue 2701663003: CompositorFrameSinkSupportClient::WillDraw needs to take in arguments (Closed)
Patch Set: c Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « services/ui/public/cpp/window_compositor_frame_sink.h ('k') | services/ui/ws/frame_generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_sink_client.h" 10 #include "cc/output/compositor_frame_sink_client.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 void WindowCompositorFrameSink::ReclaimResources( 110 void WindowCompositorFrameSink::ReclaimResources(
111 const cc::ReturnedResourceArray& resources) { 111 const cc::ReturnedResourceArray& resources) {
112 DCHECK(thread_checker_); 112 DCHECK(thread_checker_);
113 DCHECK(thread_checker_->CalledOnValidThread()); 113 DCHECK(thread_checker_->CalledOnValidThread());
114 if (!client_) 114 if (!client_)
115 return; 115 return;
116 client_->ReclaimResources(resources); 116 client_->ReclaimResources(resources);
117 } 117 }
118 118
119 void WindowCompositorFrameSink::WillDrawSurface() { 119 void WindowCompositorFrameSink::WillDrawSurface(
120 const cc::LocalSurfaceId& local_surface_id,
121 const gfx::Rect& damage_rect) {
120 // TODO(fsamuel, staraz): Implement this. 122 // TODO(fsamuel, staraz): Implement this.
121 } 123 }
122 124
123 void WindowCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) { 125 void WindowCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) {
124 compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames); 126 compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames);
125 } 127 }
126 128
127 WindowCompositorFrameSinkBinding::~WindowCompositorFrameSinkBinding() {} 129 WindowCompositorFrameSinkBinding::~WindowCompositorFrameSinkBinding() {}
128 130
129 WindowCompositorFrameSinkBinding::WindowCompositorFrameSinkBinding( 131 WindowCompositorFrameSinkBinding::WindowCompositorFrameSinkBinding(
130 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink_request, 132 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink_request,
131 cc::mojom::MojoCompositorFrameSinkClientPtrInfo 133 cc::mojom::MojoCompositorFrameSinkClientPtrInfo
132 compositor_frame_sink_client) 134 compositor_frame_sink_client)
133 : compositor_frame_sink_request_(std::move(compositor_frame_sink_request)), 135 : compositor_frame_sink_request_(std::move(compositor_frame_sink_request)),
134 compositor_frame_sink_client_(std::move(compositor_frame_sink_client)) {} 136 compositor_frame_sink_client_(std::move(compositor_frame_sink_client)) {}
135 137
136 cc::mojom::MojoCompositorFrameSinkRequest 138 cc::mojom::MojoCompositorFrameSinkRequest
137 WindowCompositorFrameSinkBinding::TakeFrameSinkRequest() { 139 WindowCompositorFrameSinkBinding::TakeFrameSinkRequest() {
138 return std::move(compositor_frame_sink_request_); 140 return std::move(compositor_frame_sink_request_);
139 } 141 }
140 142
141 cc::mojom::MojoCompositorFrameSinkClientPtrInfo 143 cc::mojom::MojoCompositorFrameSinkClientPtrInfo
142 WindowCompositorFrameSinkBinding::TakeFrameSinkClient() { 144 WindowCompositorFrameSinkBinding::TakeFrameSinkClient() {
143 return std::move(compositor_frame_sink_client_); 145 return std::move(compositor_frame_sink_client_);
144 } 146 }
145 147
146 } // namespace ui 148 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window_compositor_frame_sink.h ('k') | services/ui/ws/frame_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698