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

Side by Side Diff: media/mojo/services/mojo_renderer_impl.cc

Issue 1996763002: Make painting a single frame a permanent API on VideoRendererSink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. 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 unified diff | Download patch
« no previous file with comments | « media/filters/video_renderer_algorithm.h ('k') | media/renderers/video_renderer_impl.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 "media/mojo/services/mojo_renderer_impl.h" 5 #include "media/mojo/services/mojo_renderer_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // TODO(tim): Should we plumb error code from remote renderer? 183 // TODO(tim): Should we plumb error code from remote renderer?
184 // http://crbug.com/410451. 184 // http://crbug.com/410451.
185 client_->OnError(PIPELINE_ERROR_DECODE); 185 client_->OnError(PIPELINE_ERROR_DECODE);
186 } 186 }
187 187
188 void MojoRendererImpl::OnVideoNaturalSizeChange(mojo::SizePtr size) { 188 void MojoRendererImpl::OnVideoNaturalSizeChange(mojo::SizePtr size) {
189 gfx::Size new_size = size.To<gfx::Size>(); 189 gfx::Size new_size = size.To<gfx::Size>();
190 DVLOG(2) << __FUNCTION__ << ": " << new_size.ToString(); 190 DVLOG(2) << __FUNCTION__ << ": " << new_size.ToString();
191 DCHECK(task_runner_->BelongsToCurrentThread()); 191 DCHECK(task_runner_->BelongsToCurrentThread());
192 192
193 video_renderer_sink_->PaintFrameUsingOldRenderingPath( 193 video_renderer_sink_->PaintSingleFrame(
194 video_overlay_factory_->CreateFrame(new_size)); 194 video_overlay_factory_->CreateFrame(new_size));
195 client_->OnVideoNaturalSizeChange(new_size); 195 client_->OnVideoNaturalSizeChange(new_size);
196 } 196 }
197 197
198 void MojoRendererImpl::OnVideoOpacityChange(bool opaque) { 198 void MojoRendererImpl::OnVideoOpacityChange(bool opaque) {
199 DVLOG(2) << __FUNCTION__ << ": " << opaque; 199 DVLOG(2) << __FUNCTION__ << ": " << opaque;
200 DCHECK(task_runner_->BelongsToCurrentThread()); 200 DCHECK(task_runner_->BelongsToCurrentThread());
201 client_->OnVideoOpacityChange(opaque); 201 client_->OnVideoOpacityChange(opaque);
202 } 202 }
203 203
(...skipping 12 matching lines...) Expand all
216 void MojoRendererImpl::OnInitialized(bool success) { 216 void MojoRendererImpl::OnInitialized(bool success) {
217 DVLOG(1) << __FUNCTION__; 217 DVLOG(1) << __FUNCTION__;
218 DCHECK(task_runner_->BelongsToCurrentThread()); 218 DCHECK(task_runner_->BelongsToCurrentThread());
219 DCHECK(!init_cb_.is_null()); 219 DCHECK(!init_cb_.is_null());
220 220
221 base::ResetAndReturn(&init_cb_) 221 base::ResetAndReturn(&init_cb_)
222 .Run(success ? PIPELINE_OK : PIPELINE_ERROR_INITIALIZATION_FAILED); 222 .Run(success ? PIPELINE_OK : PIPELINE_ERROR_INITIALIZATION_FAILED);
223 } 223 }
224 224
225 } // namespace media 225 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/video_renderer_algorithm.h ('k') | media/renderers/video_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698