| 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_ms.h" | 5 #include "content/renderer/media/webmediaplayer_ms.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 received_first_frame_ = true; | 502 received_first_frame_ = true; |
| 503 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata); | 503 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata); |
| 504 SetReadyState(WebMediaPlayer::ReadyStateHaveEnoughData); | 504 SetReadyState(WebMediaPlayer::ReadyStateHaveEnoughData); |
| 505 | 505 |
| 506 if (video_frame_provider_.get()) { | 506 if (video_frame_provider_.get()) { |
| 507 ignore_result(frame->metadata()->GetRotation( | 507 ignore_result(frame->metadata()->GetRotation( |
| 508 media::VideoFrameMetadata::ROTATION, &video_rotation_)); | 508 media::VideoFrameMetadata::ROTATION, &video_rotation_)); |
| 509 | 509 |
| 510 video_weblayer_.reset(new cc_blink::WebLayerImpl( | 510 video_weblayer_.reset(new cc_blink::WebLayerImpl( |
| 511 cc::VideoLayer::Create(compositor_.get(), video_rotation_))); | 511 cc::VideoLayer::Create(compositor_.get(), video_rotation_))); |
| 512 video_weblayer_->layer()->SetContentsOpaque(false); | 512 video_weblayer_->layer()->SetContentsOpaque(true); |
| 513 video_weblayer_->SetContentsOpaqueIsFixed(true); | 513 video_weblayer_->SetContentsOpaqueIsFixed(true); |
| 514 get_client()->setWebLayer(video_weblayer_.get()); | 514 get_client()->setWebLayer(video_weblayer_.get()); |
| 515 } | 515 } |
| 516 } | 516 } |
| 517 | 517 |
| 518 compositor_->EnqueueFrame(frame); | 518 compositor_->EnqueueFrame(frame); |
| 519 } | 519 } |
| 520 | 520 |
| 521 void WebMediaPlayerMS::RepaintInternal() { | 521 void WebMediaPlayerMS::RepaintInternal() { |
| 522 DVLOG(1) << __func__; | 522 DVLOG(1) << __func__; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 551 void WebMediaPlayerMS::ResetCanvasCache() { | 551 void WebMediaPlayerMS::ResetCanvasCache() { |
| 552 DCHECK(thread_checker_.CalledOnValidThread()); | 552 DCHECK(thread_checker_.CalledOnValidThread()); |
| 553 video_renderer_.ResetCache(); | 553 video_renderer_.ResetCache(); |
| 554 } | 554 } |
| 555 | 555 |
| 556 void WebMediaPlayerMS::TriggerResize() { | 556 void WebMediaPlayerMS::TriggerResize() { |
| 557 get_client()->sizeChanged(); | 557 get_client()->sizeChanged(); |
| 558 } | 558 } |
| 559 | 559 |
| 560 } // namespace content | 560 } // namespace content |
| OLD | NEW |