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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 double WebMediaPlayerMS::maxTimeSeekable() const { | 312 double WebMediaPlayerMS::maxTimeSeekable() const { |
313 DCHECK(thread_checker_.CalledOnValidThread()); | 313 DCHECK(thread_checker_.CalledOnValidThread()); |
314 return 0.0; | 314 return 0.0; |
315 } | 315 } |
316 | 316 |
317 bool WebMediaPlayerMS::didLoadingProgress() { | 317 bool WebMediaPlayerMS::didLoadingProgress() { |
318 DCHECK(thread_checker_.CalledOnValidThread()); | 318 DCHECK(thread_checker_.CalledOnValidThread()); |
319 return true; | 319 return true; |
320 } | 320 } |
321 | 321 |
322 void WebMediaPlayerMS::paint(WebCanvas* canvas, | 322 void WebMediaPlayerMS::paint(blink::WebCanvas* canvas, |
323 const WebRect& rect, | 323 const blink::WebRect& rect, |
324 unsigned char alpha) { | 324 unsigned char alpha) { |
| 325 paint(canvas, rect, alpha, SkXfermode::kSrcOver_Mode); |
| 326 } |
| 327 |
| 328 void WebMediaPlayerMS::paint(blink::WebCanvas* canvas, |
| 329 const blink::WebRect& rect, |
| 330 unsigned char alpha, |
| 331 SkXfermode::Mode mode) { |
325 DVLOG(3) << "WebMediaPlayerMS::paint"; | 332 DVLOG(3) << "WebMediaPlayerMS::paint"; |
326 DCHECK(thread_checker_.CalledOnValidThread()); | 333 DCHECK(thread_checker_.CalledOnValidThread()); |
327 | 334 |
328 gfx::RectF dest_rect(rect.x, rect.y, rect.width, rect.height); | 335 gfx::RectF dest_rect(rect.x, rect.y, rect.width, rect.height); |
329 video_renderer_.Paint( | 336 video_renderer_.Paint(current_frame_.get(), |
330 current_frame_.get(), canvas, dest_rect, alpha, media::VIDEO_ROTATION_0); | 337 canvas, |
| 338 dest_rect, |
| 339 alpha, |
| 340 mode, |
| 341 media::VIDEO_ROTATION_0); |
331 | 342 |
332 { | 343 { |
333 base::AutoLock auto_lock(current_frame_lock_); | 344 base::AutoLock auto_lock(current_frame_lock_); |
334 if (current_frame_.get()) | 345 if (current_frame_.get()) |
335 current_frame_used_ = true; | 346 current_frame_used_ = true; |
336 } | 347 } |
337 } | 348 } |
338 | 349 |
339 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const { | 350 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const { |
340 DCHECK(thread_checker_.CalledOnValidThread()); | 351 DCHECK(thread_checker_.CalledOnValidThread()); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 GetClient()->readyStateChanged(); | 485 GetClient()->readyStateChanged(); |
475 } | 486 } |
476 | 487 |
477 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { | 488 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { |
478 DCHECK(thread_checker_.CalledOnValidThread()); | 489 DCHECK(thread_checker_.CalledOnValidThread()); |
479 DCHECK(client_); | 490 DCHECK(client_); |
480 return client_; | 491 return client_; |
481 } | 492 } |
482 | 493 |
483 } // namespace content | 494 } // namespace content |
OLD | NEW |