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

Side by Side Diff: media/renderers/video_overlay_factory.cc

Issue 1961273002: Disable idle suspend for Chromecast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 | « media/blink/webmediaplayer_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698