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

Side by Side Diff: remoting/client/plugin/pepper_video_renderer_3d.cc

Issue 910343002: Decompose VideoRenderer from VideoStub. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix perf test Created 5 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_video_renderer_3d.h" 5 #include "remoting/client/plugin/pepper_video_renderer_3d.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 graphics_, video_profile, PP_HARDWAREACCELERATION_WITHFALLBACK, 170 graphics_, video_profile, PP_HARDWAREACCELERATION_WITHFALLBACK,
171 callback_factory_.NewCallback(&PepperVideoRenderer3D::OnInitialized)); 171 callback_factory_.NewCallback(&PepperVideoRenderer3D::OnInitialized));
172 CHECK_EQ(result, PP_OK_COMPLETIONPENDING) 172 CHECK_EQ(result, PP_OK_COMPLETIONPENDING)
173 << "video_decoder_.Initialize() returned " << result; 173 << "video_decoder_.Initialize() returned " << result;
174 } 174 }
175 175
176 ChromotingStats* PepperVideoRenderer3D::GetStats() { 176 ChromotingStats* PepperVideoRenderer3D::GetStats() {
177 return &stats_; 177 return &stats_;
178 } 178 }
179 179
180 protocol::VideoStub* PepperVideoRenderer3D::GetVideoStub() {
181 return this;
182 }
183
180 void PepperVideoRenderer3D::ProcessVideoPacket(scoped_ptr<VideoPacket> packet, 184 void PepperVideoRenderer3D::ProcessVideoPacket(scoped_ptr<VideoPacket> packet,
181 const base::Closure& done) { 185 const base::Closure& done) {
182 base::ScopedClosureRunner done_runner(done); 186 base::ScopedClosureRunner done_runner(done);
183 187
184 // Don't need to do anything if the packet is empty. Host sends empty video 188 // Don't need to do anything if the packet is empty. Host sends empty video
185 // packets when the screen is not changing. 189 // packets when the screen is not changing.
186 if (!packet->data().size()) 190 if (!packet->data().size())
187 return; 191 return;
188 192
189 // Update statistics. 193 // Update statistics.
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader); 512 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader);
509 gles2_if_->DeleteShader(graphics_.pp_resource(), shader); 513 gles2_if_->DeleteShader(graphics_.pp_resource(), shader);
510 } 514 }
511 515
512 void PepperVideoRenderer3D::CheckGLError() { 516 void PepperVideoRenderer3D::CheckGLError() {
513 GLenum error = gles2_if_->GetError(graphics_.pp_resource()); 517 GLenum error = gles2_if_->GetError(graphics_.pp_resource());
514 CHECK_EQ(error, static_cast<GLenum>(GL_NO_ERROR)) << "GL error: " << error; 518 CHECK_EQ(error, static_cast<GLenum>(GL_NO_ERROR)) << "GL error: " << error;
515 } 519 }
516 520
517 } // namespace remoting 521 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_video_renderer_3d.h ('k') | remoting/client/software_video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698