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

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

Issue 2150833002: [Chromoting] Fallback to use software renderer if desktop image size is larger than GPU limitaiton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve review comments Created 4 years, 2 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 | remoting/client/plugin/pepper_video_renderer_3d.cc » ('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 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>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "ppapi/cpp/graphics_3d.h" 16 #include "ppapi/cpp/graphics_3d.h"
17 #include "ppapi/cpp/instance_handle.h" 17 #include "ppapi/cpp/instance_handle.h"
18 #include "ppapi/cpp/video_decoder.h" 18 #include "ppapi/cpp/video_decoder.h"
19 #include "ppapi/utility/completion_callback_factory.h" 19 #include "ppapi/utility/completion_callback_factory.h"
20 #include "remoting/client/plugin/pepper_video_renderer.h" 20 #include "remoting/client/plugin/pepper_video_renderer.h"
21 #include "remoting/client/plugin/pepper_video_renderer_2d.h"
21 #include "remoting/protocol/video_stub.h" 22 #include "remoting/protocol/video_stub.h"
22 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 23 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
23 24
24 struct PPB_OpenGLES2; 25 struct PPB_OpenGLES2;
25 26
26 namespace remoting { 27 namespace remoting {
27 28
28 namespace protocol { 29 namespace protocol {
29 class FrameStatsConsumer; 30 class FrameStatsConsumer;
30 } // namespace protocol 31 } // namespace protocol
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 std::list<std::unique_ptr<FrameTracker>> next_picture_frames_; 130 std::list<std::unique_ptr<FrameTracker>> next_picture_frames_;
130 131
131 // The current picture shown on the screen or being rendered. Must be deleted 132 // The current picture shown on the screen or being rendered. Must be deleted
132 // before |video_decoder_|. 133 // before |video_decoder_|.
133 std::unique_ptr<Picture> current_picture_; 134 std::unique_ptr<Picture> current_picture_;
134 135
135 // FrameTrackers for frames in |current_picture_|. The queue is emptied once 136 // FrameTrackers for frames in |current_picture_|. The queue is emptied once
136 // the |current_picture_| is rendered. 137 // the |current_picture_| is rendered.
137 std::list<std::unique_ptr<FrameTracker>> current_picture_frames_; 138 std::list<std::unique_ptr<FrameTracker>> current_picture_frames_;
138 139
140 // The fallback software renderer, if input video packet size is larger than
141 // hardware limitation.
142 PepperVideoRenderer2D fallback_renderer_;
143 bool use_fallback_renderer_ = false;
144
139 // Set to true if the screen has been resized and needs to be repainted. 145 // Set to true if the screen has been resized and needs to be repainted.
140 bool force_repaint_ = false; 146 bool force_repaint_ = false;
141 147
142 // The texture type for which |shader_program| was initialized. Can be either 148 // The texture type for which |shader_program| was initialized. Can be either
143 // 0, GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB or GL_TEXTURE_EXTERNAL_OES. 0 149 // 0, GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB or GL_TEXTURE_EXTERNAL_OES. 0
144 // indicates that |shader_program_| hasn't been intialized. 150 // indicates that |shader_program_| hasn't been intialized.
145 uint32_t current_shader_program_texture_target_ = 0; 151 uint32_t current_shader_program_texture_target_ = 0;
146 152
147 // Shader program ID. 153 // Shader program ID.
148 unsigned int shader_program_ = 0; 154 unsigned int shader_program_ = 0;
149 155
150 // Location of the scale value to be passed to the |shader_program_|. 156 // Location of the scale value to be passed to the |shader_program_|.
151 int shader_texcoord_scale_location_ = 0; 157 int shader_texcoord_scale_location_ = 0;
152 158
153 // True if the renderer has received frame from the host. 159 // True if the renderer has received frame from the host.
154 bool frame_received_ = false; 160 bool frame_received_ = false;
155 161
156 // True if dirty regions are to be sent to |event_handler_| for debugging. 162 // True if dirty regions are to be sent to |event_handler_| for debugging.
157 bool debug_dirty_region_ = false; 163 bool debug_dirty_region_ = false;
158 164
159 pp::CompletionCallbackFactory<PepperVideoRenderer3D> callback_factory_; 165 pp::CompletionCallbackFactory<PepperVideoRenderer3D> callback_factory_;
160 166
167 // The hardware limitation.
168 int gl_max_texture_size_;
169 int gl_max_viewport_size_[2];
170
161 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer3D); 171 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer3D);
162 }; 172 };
163 173
164 } // namespace remoting 174 } // namespace remoting
165 175
166 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_ 176 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_video_renderer_3d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698