| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |