| 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_impl.h" | 5 #include "content/renderer/media/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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 // TODO(scherkus): Clarify paint() API contract to better understand when and | 541 // TODO(scherkus): Clarify paint() API contract to better understand when and |
| 542 // why it's being called. For example, today paint() is called when: | 542 // why it's being called. For example, today paint() is called when: |
| 543 // - We haven't reached HAVE_CURRENT_DATA and need to paint black | 543 // - We haven't reached HAVE_CURRENT_DATA and need to paint black |
| 544 // - We're painting to a canvas | 544 // - We're painting to a canvas |
| 545 // See http://crbug.com/341225 http://crbug.com/342621 for details. | 545 // See http://crbug.com/341225 http://crbug.com/342621 for details. |
| 546 scoped_refptr<media::VideoFrame> video_frame = | 546 scoped_refptr<media::VideoFrame> video_frame = |
| 547 GetCurrentFrameFromCompositor(); | 547 GetCurrentFrameFromCompositor(); |
| 548 | 548 |
| 549 gfx::Rect gfx_rect(rect); | 549 gfx::Rect gfx_rect(rect); |
| 550 | 550 |
| 551 skcanvas_video_renderer_.Paint(video_frame.get(), | 551 skcanvas_video_renderer_.Paint(video_frame, |
| 552 canvas, | 552 canvas, |
| 553 gfx_rect, | 553 gfx_rect, |
| 554 alpha, | 554 alpha, |
| 555 mode, | 555 mode, |
| 556 pipeline_metadata_.video_rotation); | 556 pipeline_metadata_.video_rotation); |
| 557 } | 557 } |
| 558 | 558 |
| 559 bool WebMediaPlayerImpl::hasSingleSecurityOrigin() const { | 559 bool WebMediaPlayerImpl::hasSingleSecurityOrigin() const { |
| 560 if (data_source_) | 560 if (data_source_) |
| 561 return data_source_->HasSingleOrigin(); | 561 return data_source_->HasSingleOrigin(); |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 compositor_task_runner_->PostTask(FROM_HERE, | 1064 compositor_task_runner_->PostTask(FROM_HERE, |
| 1065 base::Bind(&GetCurrentFrameAndSignal, | 1065 base::Bind(&GetCurrentFrameAndSignal, |
| 1066 base::Unretained(compositor_), | 1066 base::Unretained(compositor_), |
| 1067 &video_frame, | 1067 &video_frame, |
| 1068 &event)); | 1068 &event)); |
| 1069 event.Wait(); | 1069 event.Wait(); |
| 1070 return video_frame; | 1070 return video_frame; |
| 1071 } | 1071 } |
| 1072 | 1072 |
| 1073 } // namespace content | 1073 } // namespace content |
| OLD | NEW |