| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/renderers/video_overlay_factory.h" | 5 #include "media/renderers/video_overlay_factory.h" |
| 6 | 6 |
| 7 #include "gpu/GLES2/gl2extchromium.h" | 7 #include "gpu/GLES2/gl2extchromium.h" |
| 8 #include "gpu/command_buffer/client/gles2_interface.h" | 8 #include "gpu/command_buffer/client/gles2_interface.h" |
| 9 #include "gpu/command_buffer/common/mailbox.h" | 9 #include "gpu/command_buffer/common/mailbox.h" |
| 10 #include "gpu/command_buffer/common/sync_token.h" | 10 #include "gpu/command_buffer/common/sync_token.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 gpu::MailboxHolder holders[VideoFrame::kMaxPlanes] = {gpu::MailboxHolder( | 90 gpu::MailboxHolder holders[VideoFrame::kMaxPlanes] = {gpu::MailboxHolder( |
| 91 texture_->mailbox_, texture_->sync_token_, GL_TEXTURE_2D)}; | 91 texture_->mailbox_, texture_->sync_token_, GL_TEXTURE_2D)}; |
| 92 scoped_refptr<VideoFrame> frame = VideoFrame::WrapNativeTextures( | 92 scoped_refptr<VideoFrame> frame = VideoFrame::WrapNativeTextures( |
| 93 PIXEL_FORMAT_XRGB, holders, VideoFrame::ReleaseMailboxCB(), | 93 PIXEL_FORMAT_XRGB, holders, VideoFrame::ReleaseMailboxCB(), |
| 94 size, // coded_size | 94 size, // coded_size |
| 95 gfx::Rect(size), // visible rect | 95 gfx::Rect(size), // visible rect |
| 96 size, // natural size | 96 size, // natural size |
| 97 base::TimeDelta()); // timestamp | 97 base::TimeDelta()); // timestamp |
| 98 CHECK(frame); | 98 CHECK(frame); |
| 99 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); | 99 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); |
| 100 // TODO(halliwell): this is to block idle suspend behaviour on Chromecast. |
| 101 // Find a better way to do this. |
| 102 frame->metadata()->SetBoolean(VideoFrameMetadata::DECODER_OWNS_FRAME, true); |
| 100 return frame; | 103 return frame; |
| 101 } | 104 } |
| 102 | 105 |
| 103 } // namespace media | 106 } // namespace media |
| OLD | NEW |