Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: content/renderer/media/webmediaplayer_ms.cc

Issue 445013002: media: Optimize HW Video to 2D Canvas copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve comments, rebase to ToT Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_,
331 current_frame_, canvas, dest_rect, alpha, mode, media::VIDEO_ROTATION_0); 331 canvas,
332 dest_rect,
333 alpha,
334 mode,
335 media::VIDEO_ROTATION_0,
336 media::Context3DProvider());
332 337
333 { 338 {
334 base::AutoLock auto_lock(current_frame_lock_); 339 base::AutoLock auto_lock(current_frame_lock_);
335 if (current_frame_.get()) 340 if (current_frame_.get())
336 current_frame_used_ = true; 341 current_frame_used_ = true;
337 } 342 }
338 } 343 }
339 344
340 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const { 345 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const {
341 DCHECK(thread_checker_.CalledOnValidThread()); 346 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 GetClient()->readyStateChanged(); 480 GetClient()->readyStateChanged();
476 } 481 }
477 482
478 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { 483 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() {
479 DCHECK(thread_checker_.CalledOnValidThread()); 484 DCHECK(thread_checker_.CalledOnValidThread());
480 DCHECK(client_); 485 DCHECK(client_);
481 return client_; 486 return client_;
482 } 487 }
483 488
484 } // namespace content 489 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698