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

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 531353002: Add VideoImageGenerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.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 "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 // TODO(scherkus): Clarify paint() API contract to better understand when and 516 // TODO(scherkus): Clarify paint() API contract to better understand when and
517 // why it's being called. For example, today paint() is called when: 517 // why it's being called. For example, today paint() is called when:
518 // - We haven't reached HAVE_CURRENT_DATA and need to paint black 518 // - We haven't reached HAVE_CURRENT_DATA and need to paint black
519 // - We're painting to a canvas 519 // - We're painting to a canvas
520 // See http://crbug.com/341225 http://crbug.com/342621 for details. 520 // See http://crbug.com/341225 http://crbug.com/342621 for details.
521 scoped_refptr<VideoFrame> video_frame = 521 scoped_refptr<VideoFrame> video_frame =
522 GetCurrentFrameFromCompositor(); 522 GetCurrentFrameFromCompositor();
523 523
524 gfx::Rect gfx_rect(rect); 524 gfx::Rect gfx_rect(rect);
525 525
526 skcanvas_video_renderer_.Paint(video_frame.get(), 526 skcanvas_video_renderer_.Paint(video_frame,
527 canvas, 527 canvas,
528 gfx_rect, 528 gfx_rect,
529 alpha, 529 alpha,
530 mode, 530 mode,
531 pipeline_metadata_.video_rotation); 531 pipeline_metadata_.video_rotation);
532 } 532 }
533 533
534 bool WebMediaPlayerImpl::hasSingleSecurityOrigin() const { 534 bool WebMediaPlayerImpl::hasSingleSecurityOrigin() const {
535 if (data_source_) 535 if (data_source_)
536 return data_source_->HasSingleOrigin(); 536 return data_source_->HasSingleOrigin();
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 compositor_task_runner_->PostTask(FROM_HERE, 1024 compositor_task_runner_->PostTask(FROM_HERE,
1025 base::Bind(&GetCurrentFrameAndSignal, 1025 base::Bind(&GetCurrentFrameAndSignal,
1026 base::Unretained(compositor_), 1026 base::Unretained(compositor_),
1027 &video_frame, 1027 &video_frame,
1028 &event)); 1028 &event));
1029 event.Wait(); 1029 event.Wait();
1030 return video_frame; 1030 return video_frame;
1031 } 1031 }
1032 1032
1033 } // namespace media 1033 } // namespace media
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | media/filters/skcanvas_video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698