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

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: Use scratch texture Created 6 years, 3 months 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 SkXfermode::Mode mode) { 331 SkXfermode::Mode mode) {
332 DVLOG(3) << "WebMediaPlayerMS::paint"; 332 DVLOG(3) << "WebMediaPlayerMS::paint";
333 DCHECK(thread_checker_.CalledOnValidThread()); 333 DCHECK(thread_checker_.CalledOnValidThread());
334 334
335 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);
336 video_renderer_.Paint(current_frame_.get(), 336 video_renderer_.Paint(current_frame_.get(),
337 canvas, 337 canvas,
338 dest_rect, 338 dest_rect,
339 alpha, 339 alpha,
340 mode, 340 mode,
341 media::VIDEO_ROTATION_0); 341 media::VIDEO_ROTATION_0,
342 NULL);
342 343
343 { 344 {
344 base::AutoLock auto_lock(current_frame_lock_); 345 base::AutoLock auto_lock(current_frame_lock_);
345 if (current_frame_.get()) 346 if (current_frame_.get())
346 current_frame_used_ = true; 347 current_frame_used_ = true;
347 } 348 }
348 } 349 }
349 350
350 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const { 351 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const {
351 DCHECK(thread_checker_.CalledOnValidThread()); 352 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 GetClient()->readyStateChanged(); 486 GetClient()->readyStateChanged();
486 } 487 }
487 488
488 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { 489 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() {
489 DCHECK(thread_checker_.CalledOnValidThread()); 490 DCHECK(thread_checker_.CalledOnValidThread());
490 DCHECK(client_); 491 DCHECK(client_);
491 return client_; 492 return client_;
492 } 493 }
493 494
494 } // namespace content 495 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698