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_ | |
| 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 | |
| 18 // Initialize a Painter class with a width and a height | |
| 19 virtual void Initialize(int width, int height) = 0; | |
| 20 | |
| 21 // Loads frames into Painter. Painter does not take ownership of frames. | |
| 22 virtual void LoadFrames( | |
| 23 std::deque<scoped_refptr<media::VideoFrame> >* frames); | |
| 24 | |
| 25 // Called window is ready to be painted. | |
| 26 virtual void OnPaint(); | |
| 27 | |
| 28 // Paint a single frame to a window. | |
| 29 virtual void Paint(scoped_refptr<media::VideoFrame> video_frame) = 0; | |
| 30 | |
| 31 protected: | |
| 32 std::deque<scoped_refptr<media::VideoFrame> >* frames_; | |
| 33 }; | |
|
Alpha Left Google
2010/11/29 20:06:13
You can add a private section and then disallow_co
vrk (LEFT CHROMIUM)
2010/11/30 01:21:35
Done.
| |
| 34 | |
| 35 #endif // MEDIA_TOOLS_BENCHMARK_PAINTER_H_ | |
| OLD | NEW |