Chromium Code Reviews| Index: media/tools/shader_bench/painter.h |
| diff --git a/media/tools/shader_bench/painter.h b/media/tools/shader_bench/painter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..52ca1a12ef7bfed0c21de763803675ba31010113 |
| --- /dev/null |
| +++ b/media/tools/shader_bench/painter.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#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.
|
| +#define MEDIA_TOOLS_BENCHMARK_PAINTER_H_ |
| + |
| +#include <deque> |
| + |
| +#include "base/scoped_ptr.h" |
| +#include "media/base/video_frame.h" |
| + |
| +// Class that paints video frames to a window. |
| +class Painter { |
| + public: |
| + Painter(); |
| + |
|
scherkus (not reviewing)
2010/11/30 23:36:10
where's the destructor?
vrk (LEFT CHROMIUM)
2010/12/01 02:46:11
Oops! Added.
|
| + // Loads frames into Painter. Painter does not take ownership of frames. |
| + virtual void LoadFrames( |
| + std::deque<scoped_refptr<media::VideoFrame> >* frames); |
| + |
| + // Called window is ready to be painted. |
| + virtual void OnPaint(); |
| + |
| + // Initialize a Painter class with a width and a height |
| + virtual void Initialize(int width, int height) = 0; |
| + |
| + // Paint a single frame to a window. |
| + virtual void Paint(scoped_refptr<media::VideoFrame> video_frame) = 0; |
| + |
| + protected: |
| + // Frames that the Painter will paint. |
| + std::deque<scoped_refptr<media::VideoFrame> >* frames_; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(Painter); |
| +}; |
| + |
| +#endif // MEDIA_TOOLS_BENCHMARK_PAINTER_H_ |