2013-05-16 12:08:03 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2015-12-08 09:08:57 +01:00
|
|
|
#ifndef WEBRTC_TEST_LINUX_GLX_RENDERER_H_
|
|
|
|
|
#define WEBRTC_TEST_LINUX_GLX_RENDERER_H_
|
2013-05-16 12:08:03 +00:00
|
|
|
|
|
|
|
|
#include <GL/glx.h>
|
2013-05-17 13:44:48 +00:00
|
|
|
#include <X11/Xlib.h>
|
2013-05-16 12:08:03 +00:00
|
|
|
|
2013-10-28 16:32:01 +00:00
|
|
|
#include "webrtc/test/gl/gl_renderer.h"
|
2013-05-29 11:34:32 +00:00
|
|
|
#include "webrtc/typedefs.h"
|
2013-05-16 12:08:03 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
namespace test {
|
|
|
|
|
|
|
|
|
|
class GlxRenderer : public GlRenderer {
|
|
|
|
|
public:
|
|
|
|
|
static GlxRenderer* Create(const char* window_title, size_t width,
|
|
|
|
|
size_t height);
|
|
|
|
|
virtual ~GlxRenderer();
|
|
|
|
|
|
2015-05-29 17:21:40 -07:00
|
|
|
void RenderFrame(const webrtc::VideoFrame& frame, int delta) override;
|
2015-03-04 12:58:35 +00:00
|
|
|
bool IsTextureSupported() const override { return false; }
|
2015-02-09 15:14:36 +00:00
|
|
|
|
2013-05-16 12:08:03 +00:00
|
|
|
private:
|
|
|
|
|
GlxRenderer(size_t width, size_t height);
|
|
|
|
|
|
|
|
|
|
bool Init(const char* window_title);
|
|
|
|
|
void Resize(size_t width, size_t height);
|
|
|
|
|
void Destroy();
|
|
|
|
|
|
|
|
|
|
size_t width_, height_;
|
|
|
|
|
|
|
|
|
|
Display* display_;
|
|
|
|
|
Window window_;
|
|
|
|
|
GLXContext context_;
|
|
|
|
|
};
|
|
|
|
|
} // test
|
|
|
|
|
} // webrtc
|
|
|
|
|
|
2015-12-08 09:08:57 +01:00
|
|
|
#endif // WEBRTC_TEST_LINUX_GLX_RENDERER_H_
|