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..d59ed1b6c900f419004d3b06c4a4cf3d416606b6 |
--- /dev/null |
+++ b/media/tools/shader_bench/painter.h |
@@ -0,0 +1,33 @@ |
+// 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_ |
+#define MEDIA_TOOLS_BENCHMARK_PAINTER_H_ |
+ |
+#include <deque> |
+ |
+#include "app/gfx/gl/gl_bindings.h" |
+#include "app/gfx/gl/gl_context.h" |
+#include "app/gfx/gl/gl_implementation.h" |
+#include "base/scoped_ptr.h" |
+#include "media/base/video_frame.h" |
+ |
+class Painter { |
+ public: |
+ Painter(); |
+ virtual void Initialize(int width, int height) = 0; |
+ virtual void Paint(scoped_refptr<media::VideoFrame> video_frame) = 0; |
Alpha Left Google
2010/11/15 20:43:51
This should be protected. But I suggest you merge
|
+ virtual void OnPaint(); |
+ virtual void LoadFrames(std::deque<scoped_refptr<media::VideoFrame> >* frames); |
Alpha Left Google
2010/11/15 20:43:51
use const & instead of *
|
+ static GLuint LoadShader(gfx::GLContext* context, unsigned type, |
Alpha Left Google
2010/11/15 20:43:51
why are these methods in the Painter interface? Sh
|
+ const char* shader_source); |
+ static GLuint CreateShaderProgram(gfx::GLContext* context, |
+ const char* vertex_shader_source, |
+ const char* fragment_shader_source); |
+ |
+ protected: |
+ std::deque<scoped_refptr<media::VideoFrame> >* frames_; |
+}; |
+ |
+#endif // MEDIA_TOOLS_BENCHMARK_PAINTER_H_ |