OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "remoting/client/plugin/pepper_view.h" | 5 #include "remoting/client/plugin/pepper_view.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "remoting/base/tracer.h" | 8 #include "remoting/base/tracer.h" |
9 #include "remoting/client/client_context.h" | 9 #include "remoting/client/client_context.h" |
10 #include "remoting/client/plugin/chromoting_instance.h" | 10 #include "remoting/client/plugin/chromoting_instance.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 if (frame) { | 213 if (frame) { |
214 LOG(WARNING) << "Frame released."; | 214 LOG(WARNING) << "Frame released."; |
215 frame->Release(); | 215 frame->Release(); |
216 } | 216 } |
217 } | 217 } |
218 | 218 |
219 void PepperView::OnPartialFrameOutput(media::VideoFrame* frame, | 219 void PepperView::OnPartialFrameOutput(media::VideoFrame* frame, |
220 UpdatedRects* rects, | 220 UpdatedRects* rects, |
221 Task* done) { | 221 Task* done) { |
222 if (!instance_->CurrentlyOnPluginThread()) { | 222 if (!instance_->CurrentlyOnPluginThread()) { |
223 RunTaskOnPluginThread(NewTracedMethod(this, | 223 RunTaskOnPluginThread( |
224 &PepperView::OnPartialFrameOutput, | 224 NewTracedMethod(this, &PepperView::OnPartialFrameOutput, |
Nico
2010/10/24 19:51:39
Hi Will,
OnPartialFrameOutput takes a raw |frame|
| |
225 frame, rects, done)); | 225 make_scoped_refptr(frame), rects, done)); |
226 return; | 226 return; |
227 } | 227 } |
228 | 228 |
229 TraceContext::tracer()->PrintString("Calling PaintFrame"); | 229 TraceContext::tracer()->PrintString("Calling PaintFrame"); |
230 // TODO(ajwong): Clean up this API to be async so we don't need to use a | 230 // TODO(ajwong): Clean up this API to be async so we don't need to use a |
231 // member variable as a hack. | 231 // member variable as a hack. |
232 PaintFrame(frame, rects); | 232 PaintFrame(frame, rects); |
233 done->Run(); | 233 done->Run(); |
234 delete done; | 234 delete done; |
235 } | 235 } |
236 | 236 |
237 void PepperView::OnPaintDone() { | 237 void PepperView::OnPaintDone() { |
238 // TODO(ajwong):Probably should set some variable to allow repaints to | 238 // TODO(ajwong):Probably should set some variable to allow repaints to |
239 // actually paint. | 239 // actually paint. |
240 TraceContext::tracer()->PrintString("Paint flushed"); | 240 TraceContext::tracer()->PrintString("Paint flushed"); |
241 return; | 241 return; |
242 } | 242 } |
243 | 243 |
244 } // namespace remoting | 244 } // namespace remoting |
OLD | NEW |