| OLD | NEW |
| 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 <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 PP_VideoPicture picture_; | 71 PP_VideoPicture picture_; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 PepperVideoRenderer3D::PepperVideoRenderer3D() : callback_factory_(this) {} | 74 PepperVideoRenderer3D::PepperVideoRenderer3D() : callback_factory_(this) {} |
| 75 | 75 |
| 76 PepperVideoRenderer3D::~PepperVideoRenderer3D() { | 76 PepperVideoRenderer3D::~PepperVideoRenderer3D() { |
| 77 if (shader_program_) | 77 if (shader_program_) |
| 78 gles2_if_->DeleteProgram(graphics_.pp_resource(), shader_program_); | 78 gles2_if_->DeleteProgram(graphics_.pp_resource(), shader_program_); |
| 79 } | 79 } |
| 80 | 80 |
| 81 bool PepperVideoRenderer3D::Initialize( | 81 bool PepperVideoRenderer3D::InitializePepper( |
| 82 pp::Instance* instance, | 82 pp::Instance* instance, |
| 83 const ClientContext& context, | 83 const ClientContext& context, |
| 84 EventHandler* event_handler, | 84 EventHandler* event_handler, |
| 85 protocol::PerformanceTracker* perf_tracker) { | 85 protocol::PerformanceTracker* perf_tracker) { |
| 86 DCHECK(event_handler); | 86 DCHECK(event_handler); |
| 87 DCHECK(!event_handler_); | 87 DCHECK(!event_handler_); |
| 88 | 88 |
| 89 event_handler_ = event_handler; | 89 event_handler_ = event_handler; |
| 90 perf_tracker_ = perf_tracker; | 90 perf_tracker_ = perf_tracker; |
| 91 | 91 |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader); | 515 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader); |
| 516 gles2_if_->DeleteShader(graphics_.pp_resource(), shader); | 516 gles2_if_->DeleteShader(graphics_.pp_resource(), shader); |
| 517 } | 517 } |
| 518 | 518 |
| 519 void PepperVideoRenderer3D::CheckGLError() { | 519 void PepperVideoRenderer3D::CheckGLError() { |
| 520 GLenum error = gles2_if_->GetError(graphics_.pp_resource()); | 520 GLenum error = gles2_if_->GetError(graphics_.pp_resource()); |
| 521 CHECK_EQ(error, static_cast<GLenum>(GL_NO_ERROR)) << "GL error: " << error; | 521 CHECK_EQ(error, static_cast<GLenum>(GL_NO_ERROR)) << "GL error: " << error; |
| 522 } | 522 } |
| 523 | 523 |
| 524 } // namespace remoting | 524 } // namespace remoting |
| OLD | NEW |