#ifndef MEDIA_TOOLS_PLAYER_X11_GL_VIDEO_RENDERER_H_
#define MEDIA_TOOLS_PLAYER_X11_GL_VIDEO_RENDERER_H_
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "ui/gl/gl_bindings.h"
namespace media {
class VideoFrame;
}
class GlVideoRenderer : public base::RefCountedThreadSafe<GlVideoRenderer> {
public:
GlVideoRenderer(Display* display, Window window);
void Paint(media::VideoFrame* video_frame);
private:
friend class base::RefCountedThreadSafe<GlVideoRenderer>;
~GlVideoRenderer();
void Initialize(gfx::Size coded_size, gfx::Rect visible_rect);
Display* display_;
Window window_;
GLXContext gl_context_;
GLuint textures_[3];
DISALLOW_COPY_AND_ASSIGN(GlVideoRenderer);
};
#endif