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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 } | 320 } |
321 | 321 |
322 void WebMediaPlayerMS::paint(blink::WebCanvas* canvas, | 322 void WebMediaPlayerMS::paint(blink::WebCanvas* canvas, |
323 const blink::WebRect& rect, | 323 const blink::WebRect& rect, |
324 unsigned char alpha, | 324 unsigned char alpha, |
325 SkXfermode::Mode mode) { | 325 SkXfermode::Mode mode) { |
326 DVLOG(3) << "WebMediaPlayerMS::paint"; | 326 DVLOG(3) << "WebMediaPlayerMS::paint"; |
327 DCHECK(thread_checker_.CalledOnValidThread()); | 327 DCHECK(thread_checker_.CalledOnValidThread()); |
328 | 328 |
329 gfx::RectF dest_rect(rect.x, rect.y, rect.width, rect.height); | 329 gfx::RectF dest_rect(rect.x, rect.y, rect.width, rect.height); |
330 video_renderer_.Paint( | 330 video_renderer_.Paint(current_frame_, canvas, dest_rect, alpha, mode, |
331 current_frame_, canvas, dest_rect, alpha, mode, media::VIDEO_ROTATION_0); | 331 media::VIDEO_ROTATION_0, media::Context3D()); |
332 | 332 |
333 { | 333 { |
334 base::AutoLock auto_lock(current_frame_lock_); | 334 base::AutoLock auto_lock(current_frame_lock_); |
335 if (current_frame_.get()) | 335 if (current_frame_.get()) |
336 current_frame_used_ = true; | 336 current_frame_used_ = true; |
337 } | 337 } |
338 } | 338 } |
339 | 339 |
340 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const { | 340 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const { |
341 DCHECK(thread_checker_.CalledOnValidThread()); | 341 DCHECK(thread_checker_.CalledOnValidThread()); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 GetClient()->readyStateChanged(); | 475 GetClient()->readyStateChanged(); |
476 } | 476 } |
477 | 477 |
478 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { | 478 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { |
479 DCHECK(thread_checker_.CalledOnValidThread()); | 479 DCHECK(thread_checker_.CalledOnValidThread()); |
480 DCHECK(client_); | 480 DCHECK(client_); |
481 return client_; | 481 return client_; |
482 } | 482 } |
483 | 483 |
484 } // namespace content | 484 } // namespace content |
OLD | NEW |