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

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

Issue 2101833002: [Remoting Android] DisplayUpdaterFactory cleanups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build Fix again Created 4 years, 5 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 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_ 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_
6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_ 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 16 matching lines...) Expand all
27 27
28 // PepperVideoRenderer that uses the PPB_VideoDecoder interface for video 28 // PepperVideoRenderer that uses the PPB_VideoDecoder interface for video
29 // decoding and Graphics3D for rendering. 29 // decoding and Graphics3D for rendering.
30 class PepperVideoRenderer3D : public PepperVideoRenderer, 30 class PepperVideoRenderer3D : public PepperVideoRenderer,
31 public protocol::VideoStub { 31 public protocol::VideoStub {
32 public: 32 public:
33 PepperVideoRenderer3D(); 33 PepperVideoRenderer3D();
34 ~PepperVideoRenderer3D() override; 34 ~PepperVideoRenderer3D() override;
35 35
36 // PepperVideoRenderer interface. 36 // PepperVideoRenderer interface.
37 bool Initialize(pp::Instance* instance, 37 void SetPepperContext(pp::Instance* instance,
38 const ClientContext& context, 38 EventHandler* event_handler) override;
39 EventHandler* event_handler,
40 protocol::PerformanceTracker* perf_tracker) override;
41 void OnViewChanged(const pp::View& view) override; 39 void OnViewChanged(const pp::View& view) override;
42 void EnableDebugDirtyRegion(bool enable) override; 40 void EnableDebugDirtyRegion(bool enable) override;
43 41
44 // VideoRenderer interface. 42 // VideoRenderer interface.
43 bool Initialize(const ClientContext& client_context,
44 protocol::PerformanceTracker* perf_tracker) override;
45 void OnSessionConfig(const protocol::SessionConfig& config) override; 45 void OnSessionConfig(const protocol::SessionConfig& config) override;
46 protocol::VideoStub* GetVideoStub() override; 46 protocol::VideoStub* GetVideoStub() override;
47 protocol::FrameConsumer* GetFrameConsumer() override; 47 protocol::FrameConsumer* GetFrameConsumer() override;
48 48
49 // protocol::VideoStub interface. 49 // protocol::VideoStub interface.
50 void ProcessVideoPacket(std::unique_ptr<VideoPacket> packet, 50 void ProcessVideoPacket(std::unique_ptr<VideoPacket> packet,
51 const base::Closure& done) override; 51 const base::Closure& done) override;
52 52
53 private: 53 private:
54 // Class responsible for tracking state of a frame until it's rendered. 54 // Class responsible for tracking state of a frame until it's rendered.
(...skipping 29 matching lines...) Expand all
84 84
85 // Initializes |shader_program_| with the given shaders. 85 // Initializes |shader_program_| with the given shaders.
86 void CreateProgram(const char* vertex_shader, const char* fragment_shader); 86 void CreateProgram(const char* vertex_shader, const char* fragment_shader);
87 87
88 // Creates a new shader and compiles |source| for it. 88 // Creates a new shader and compiles |source| for it.
89 void CreateShaderProgram(int type, const char* source); 89 void CreateShaderProgram(int type, const char* source);
90 90
91 // CHECKs that the last OpenGL call has completed successfully. 91 // CHECKs that the last OpenGL call has completed successfully.
92 void CheckGLError(); 92 void CheckGLError();
93 93
94 pp::Instance* instance_ = nullptr;
Sergey Ulanov 2016/06/29 23:02:12 call it pp_instance_ please
Yuwei 2016/06/29 23:38:02 Done.
94 EventHandler* event_handler_ = nullptr; 95 EventHandler* event_handler_ = nullptr;
95 protocol::PerformanceTracker* perf_tracker_ = nullptr; 96 protocol::PerformanceTracker* perf_tracker_ = nullptr;
96 97
97 pp::Graphics3D graphics_; 98 pp::Graphics3D graphics_;
98 const PPB_OpenGLES2* gles2_if_; 99 const PPB_OpenGLES2* gles2_if_;
99 pp::VideoDecoder video_decoder_; 100 pp::VideoDecoder video_decoder_;
100 101
101 webrtc::DesktopSize frame_size_; 102 webrtc::DesktopSize frame_size_;
102 103
103 webrtc::DesktopSize view_size_; 104 webrtc::DesktopSize view_size_;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 bool debug_dirty_region_ = false; 152 bool debug_dirty_region_ = false;
152 153
153 pp::CompletionCallbackFactory<PepperVideoRenderer3D> callback_factory_; 154 pp::CompletionCallbackFactory<PepperVideoRenderer3D> callback_factory_;
154 155
155 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer3D); 156 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer3D);
156 }; 157 };
157 158
158 } // namespace remoting 159 } // namespace remoting
159 160
160 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_ 161 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698