| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_TEST_LINUX_GLX_RENDERER_H_ | 11 #ifndef WEBRTC_TEST_LINUX_GLX_RENDERER_H_ |
| 12 #define WEBRTC_TEST_LINUX_GLX_RENDERER_H_ | 12 #define WEBRTC_TEST_LINUX_GLX_RENDERER_H_ |
| 13 | 13 |
| 14 #include <GL/glx.h> | 14 #include <GL/glx.h> |
| 15 #include <X11/Xlib.h> | 15 #include <X11/Xlib.h> |
| 16 | 16 |
| 17 #include "webrtc/test/gl/gl_renderer.h" | 17 #include "webrtc/test/gl/gl_renderer.h" |
| 18 #include "webrtc/typedefs.h" | 18 #include "webrtc/typedefs.h" |
| 19 | 19 |
| 20 namespace webrtc { | 20 namespace webrtc { |
| 21 namespace test { | 21 namespace test { |
| 22 | 22 |
| 23 class GlxRenderer : public GlRenderer { | 23 class GlxRenderer : public GlRenderer { |
| 24 public: | 24 public: |
| 25 static GlxRenderer* Create(const char* window_title, size_t width, | 25 static GlxRenderer* Create(const char* window_title, size_t width, |
| 26 size_t height); | 26 size_t height); |
| 27 virtual ~GlxRenderer(); | 27 virtual ~GlxRenderer(); |
| 28 | 28 |
| 29 void RenderFrame(const webrtc::VideoFrame& frame, int delta) override; | 29 void OnFrame(const webrtc::VideoFrame& frame) override; |
| 30 bool IsTextureSupported() const override { return false; } | |
| 31 | 30 |
| 32 private: | 31 private: |
| 33 GlxRenderer(size_t width, size_t height); | 32 GlxRenderer(size_t width, size_t height); |
| 34 | 33 |
| 35 bool Init(const char* window_title); | 34 bool Init(const char* window_title); |
| 36 void Resize(size_t width, size_t height); | 35 void Resize(size_t width, size_t height); |
| 37 void Destroy(); | 36 void Destroy(); |
| 38 | 37 |
| 39 size_t width_, height_; | 38 size_t width_, height_; |
| 40 | 39 |
| 41 Display* display_; | 40 Display* display_; |
| 42 Window window_; | 41 Window window_; |
| 43 GLXContext context_; | 42 GLXContext context_; |
| 44 }; | 43 }; |
| 45 } // test | 44 } // test |
| 46 } // webrtc | 45 } // webrtc |
| 47 | 46 |
| 48 #endif // WEBRTC_TEST_LINUX_GLX_RENDERER_H_ | 47 #endif // WEBRTC_TEST_LINUX_GLX_RENDERER_H_ |
| OLD | NEW |