Chromium Code Reviews| 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_BENCHMARK_PAINTER_H_ | |
|
scherkus (not reviewing)
2010/11/30 23:36:10
header guard should be MEDIA_TOOLS_SHADER_BENCH_PA
vrk (LEFT CHROMIUM)
2010/12/01 02:46:11
Done.
| |
| 6 #define MEDIA_TOOLS_BENCHMARK_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 | |
|
scherkus (not reviewing)
2010/11/30 23:36:10
where's the destructor?
vrk (LEFT CHROMIUM)
2010/12/01 02:46:11
Oops! Added.
| |
| 18 // Loads frames into Painter. Painter does not take ownership of frames. | |
| 19 virtual void LoadFrames( | |
| 20 std::deque<scoped_refptr<media::VideoFrame> >* frames); | |
| 21 | |
| 22 // Called window is ready to be painted. | |
| 23 virtual void OnPaint(); | |
| 24 | |
| 25 // Initialize a Painter class with a width and a height | |
| 26 virtual void Initialize(int width, int height) = 0; | |
| 27 | |
| 28 // Paint a single frame to a window. | |
| 29 virtual void Paint(scoped_refptr<media::VideoFrame> video_frame) = 0; | |
| 30 | |
| 31 protected: | |
| 32 // Frames that the Painter will paint. | |
| 33 std::deque<scoped_refptr<media::VideoFrame> >* frames_; | |
| 34 | |
| 35 private: | |
| 36 DISALLOW_COPY_AND_ASSIGN(Painter); | |
| 37 }; | |
| 38 | |
| 39 #endif // MEDIA_TOOLS_BENCHMARK_PAINTER_H_ | |
| OLD | NEW |