OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2010 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. | |
4 | |
5 #ifndef MEDIA_TOOLS_SHADER_BENCH_PAINTER_H_ | |
6 #define MEDIA_TOOLS_SHADER_BENCH_PAINTER_H_ | |
7 | |
8 #include <deque> | |
9 | |
10 #include "base/scoped_ptr.h" | |
11 #include "media/base/video_frame.h" | |
12 | |
13 // Class that paints video frames to a window. | |
14 class Painter { | |
15 public: | |
16 Painter(); | |
17 virtual ~Painter(); | |
18 | |
19 // Loads frames into Painter. Painter does not take ownership of frames. | |
20 virtual void LoadFrames( | |
21 std::deque<scoped_refptr<media::VideoFrame> >* frames); | |
22 | |
23 // Called window is ready to be painted. | |
24 virtual void OnPaint(); | |
25 | |
26 // Initialize a Painter class with a width and a height | |
27 virtual void Initialize(int width, int height) = 0; | |
28 | |
29 // Paint a single frame to a window. | |
30 virtual void Paint(scoped_refptr<media::VideoFrame> video_frame) = 0; | |
31 | |
32 protected: | |
33 // Frames that the Painter will paint. | |
34 std::deque<scoped_refptr<media::VideoFrame> >* frames_; | |
scherkus (not reviewing)
2010/12/01 05:28:47
looks like this doesn't need to be protected eithe
vrk (LEFT CHROMIUM)
2010/12/01 18:05:53
Done.
| |
35 | |
36 private: | |
37 DISALLOW_COPY_AND_ASSIGN(Painter); | |
38 }; | |
39 | |
40 #endif // MEDIA_TOOLS_SHADER_BENCH_PAINTER_H_ | |
OLD | NEW |