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

Side by Side Diff: content/renderer/media/android/media_player_renderer_client.cc

Issue 2239163002: Add "repaint" option to PaintSingleFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_player_simplified
Patch Set: Created 4 years, 4 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 | « no previous file | media/base/null_video_sink.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/android/media_player_renderer_client.h" 5 #include "content/renderer/media/android/media_player_renderer_client.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // We do not know whether or not the media has Video before starting playback. 108 // We do not know whether or not the media has Video before starting playback.
109 // Conservatively assume we do. 109 // Conservatively assume we do.
110 // TODO(tguilbert): Consider using MIME types to determine presence of video. 110 // TODO(tguilbert): Consider using MIME types to determine presence of video.
111 // Alternatively, consider piping the HasVideo() from the MediaPlayerRenderer 111 // Alternatively, consider piping the HasVideo() from the MediaPlayerRenderer
112 // through the mojo::Renderer interface. 112 // through the mojo::Renderer interface.
113 return true; 113 return true;
114 } 114 }
115 115
116 void MediaPlayerRendererClient::OnFrameAvailable() { 116 void MediaPlayerRendererClient::OnFrameAvailable() {
117 DCHECK(compositor_task_runner_->BelongsToCurrentThread()); 117 DCHECK(compositor_task_runner_->BelongsToCurrentThread());
118 // TODO(tguilbert): Force the repaint of the same frame. See crbug.com/636002. 118 sink_->PaintSingleFrame(stream_texture_wrapper_->GetCurrentFrame(), true);
119 sink_->PaintSingleFrame(stream_texture_wrapper_->GetCurrentFrame());
120 } 119 }
121 120
122 void MediaPlayerRendererClient::OnError(media::PipelineStatus status) { 121 void MediaPlayerRendererClient::OnError(media::PipelineStatus status) {
123 client_->OnError(status); 122 client_->OnError(status);
124 } 123 }
125 124
126 void MediaPlayerRendererClient::OnEnded() { 125 void MediaPlayerRendererClient::OnEnded() {
127 client_->OnEnded(); 126 client_->OnEnded();
128 } 127 }
129 128
(...skipping 15 matching lines...) Expand all
145 const gfx::Size& size) { 144 const gfx::Size& size) {
146 stream_texture_wrapper_->UpdateTextureSize(size); 145 stream_texture_wrapper_->UpdateTextureSize(size);
147 client_->OnVideoNaturalSizeChange(size); 146 client_->OnVideoNaturalSizeChange(size);
148 } 147 }
149 148
150 void MediaPlayerRendererClient::OnVideoOpacityChange(bool opaque) { 149 void MediaPlayerRendererClient::OnVideoOpacityChange(bool opaque) {
151 client_->OnVideoOpacityChange(opaque); 150 client_->OnVideoOpacityChange(opaque);
152 } 151 }
153 152
154 } // namespace content 153 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/base/null_video_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698