| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/media/webmediaplayer_ms.h" | 5 #include "content/renderer/media/webmediaplayer_ms.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 return true; | 317 return true; |
| 318 } | 318 } |
| 319 | 319 |
| 320 void WebMediaPlayerMS::paint(WebCanvas* canvas, | 320 void WebMediaPlayerMS::paint(WebCanvas* canvas, |
| 321 const WebRect& rect, | 321 const WebRect& rect, |
| 322 unsigned char alpha) { | 322 unsigned char alpha) { |
| 323 DVLOG(3) << "WebMediaPlayerMS::paint"; | 323 DVLOG(3) << "WebMediaPlayerMS::paint"; |
| 324 DCHECK(thread_checker_.CalledOnValidThread()); | 324 DCHECK(thread_checker_.CalledOnValidThread()); |
| 325 | 325 |
| 326 gfx::RectF dest_rect(rect.x, rect.y, rect.width, rect.height); | 326 gfx::RectF dest_rect(rect.x, rect.y, rect.width, rect.height); |
| 327 video_renderer_.Paint(current_frame_.get(), canvas, dest_rect, alpha); | 327 video_renderer_.Paint( |
| 328 current_frame_.get(), canvas, dest_rect, alpha, media::VIDEO_ROTATION_0); |
| 328 | 329 |
| 329 { | 330 { |
| 330 base::AutoLock auto_lock(current_frame_lock_); | 331 base::AutoLock auto_lock(current_frame_lock_); |
| 331 if (current_frame_.get()) | 332 if (current_frame_.get()) |
| 332 current_frame_used_ = true; | 333 current_frame_used_ = true; |
| 333 } | 334 } |
| 334 } | 335 } |
| 335 | 336 |
| 336 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const { | 337 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const { |
| 337 DCHECK(thread_checker_.CalledOnValidThread()); | 338 DCHECK(thread_checker_.CalledOnValidThread()); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 GetClient()->readyStateChanged(); | 472 GetClient()->readyStateChanged(); |
| 472 } | 473 } |
| 473 | 474 |
| 474 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { | 475 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { |
| 475 DCHECK(thread_checker_.CalledOnValidThread()); | 476 DCHECK(thread_checker_.CalledOnValidThread()); |
| 476 DCHECK(client_); | 477 DCHECK(client_); |
| 477 return client_; | 478 return client_; |
| 478 } | 479 } |
| 479 | 480 |
| 480 } // namespace content | 481 } // namespace content |
| OLD | NEW |