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