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_X11_VIDEO_RENDERER_H_
6 #define MEDIA_TOOLS_PLAYER_X11_X11_VIDEO_RENDERER_H_
10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h"
12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/size.h"
19 class X11VideoRenderer
: public base::RefCountedThreadSafe
<X11VideoRenderer
> {
21 X11VideoRenderer(Display
* display
, Window window
);
23 void Paint(const scoped_refptr
<media::VideoFrame
>& video_frame
);
26 friend class base::RefCountedThreadSafe
<X11VideoRenderer
>;
29 // Initializes X11 rendering for the given dimensions.
30 void Initialize(gfx::Size coded_size
, gfx::Rect visible_rect
);
35 // Image in heap that contains the RGBA data of the video frame.
38 // Picture represents the paint target. This is a picture located
40 unsigned long picture_
;
44 DISALLOW_COPY_AND_ASSIGN(X11VideoRenderer
);
47 #endif // MEDIA_TOOLS_PLAYER_X11_X11_VIDEO_RENDERER_H_