1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_TOOLS_PLAYER_X11_GL_VIDEO_RENDERER_H_
6 #define MEDIA_TOOLS_PLAYER_X11_GL_VIDEO_RENDERER_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "ui/gfx/rect.h"
11 #include "ui/gfx/size.h"
12 #include "ui/gl/gl_bindings.h"
18 class GlVideoRenderer
: public base::RefCountedThreadSafe
<GlVideoRenderer
> {
20 GlVideoRenderer(Display
* display
, Window window
);
22 void Paint(media::VideoFrame
* video_frame
);
25 friend class base::RefCountedThreadSafe
<GlVideoRenderer
>;
28 // Initializes GL rendering for the given dimensions.
29 void Initialize(gfx::Size coded_size
, gfx::Rect visible_rect
);
35 GLXContext gl_context_
;
37 // 3 textures, one for each plane.
40 DISALLOW_COPY_AND_ASSIGN(GlVideoRenderer
);
43 #endif // MEDIA_TOOLS_PLAYER_X11_GL_VIDEO_RENDERER_H_