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

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

Issue 402133005: Video Orientation in Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test cleanup and formatting Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/webmediaplayer_impl.cc ('k') | media/filters/skcanvas_video_renderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 return true; 317 return true;
318 } 318 }
319 319
320 void WebMediaPlayerMS::paint(WebCanvas* canvas, 320 void WebMediaPlayerMS::paint(WebCanvas* canvas,
321 const WebRect& rect, 321 const WebRect& rect,
322 unsigned char alpha) { 322 unsigned char alpha) {
323 DVLOG(3) << "WebMediaPlayerMS::paint"; 323 DVLOG(3) << "WebMediaPlayerMS::paint";
324 DCHECK(thread_checker_.CalledOnValidThread()); 324 DCHECK(thread_checker_.CalledOnValidThread());
325 325
326 gfx::RectF dest_rect(rect.x, rect.y, rect.width, rect.height); 326 gfx::RectF dest_rect(rect.x, rect.y, rect.width, rect.height);
327 video_renderer_.Paint(current_frame_.get(), canvas, dest_rect, alpha); 327 video_renderer_.Paint(
328 current_frame_.get(), canvas, dest_rect, alpha, media::VIDEO_ROTATION_0);
328 329
329 { 330 {
330 base::AutoLock auto_lock(current_frame_lock_); 331 base::AutoLock auto_lock(current_frame_lock_);
331 if (current_frame_.get()) 332 if (current_frame_.get())
332 current_frame_used_ = true; 333 current_frame_used_ = true;
333 } 334 }
334 } 335 }
335 336
336 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const { 337 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const {
337 DCHECK(thread_checker_.CalledOnValidThread()); 338 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 GetClient()->readyStateChanged(); 472 GetClient()->readyStateChanged();
472 } 473 }
473 474
474 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { 475 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() {
475 DCHECK(thread_checker_.CalledOnValidThread()); 476 DCHECK(thread_checker_.CalledOnValidThread());
476 DCHECK(client_); 477 DCHECK(client_);
477 return client_; 478 return client_;
478 } 479 }
479 480
480 } // namespace content 481 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_impl.cc ('k') | media/filters/skcanvas_video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698