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 "app/gfx/gl/gl_bindings.h" | |
| 11 #include "app/gfx/gl/gl_context.h" | |
| 12 #include "app/gfx/gl/gl_implementation.h" | |
| 13 #include "base/scoped_ptr.h" | |
| 14 #include "media/base/video_frame.h" | |
| 15 | |
| 16 class Painter { | |
| 17 public: | |
| 18 Painter(); | |
| 19 virtual void Initialize(int width, int height) = 0; | |
| 20 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
| |
| 21 virtual void OnPaint(); | |
| 22 virtual void LoadFrames(std::deque<scoped_refptr<media::VideoFrame> >* frames) ; | |
|
Alpha Left Google
2010/11/15 20:43:51
use const & instead of *
| |
| 23 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
| |
| 24 const char* shader_source); | |
| 25 static GLuint CreateShaderProgram(gfx::GLContext* context, | |
| 26 const char* vertex_shader_source, | |
| 27 const char* fragment_shader_source); | |
| 28 | |
| 29 protected: | |
| 30 std::deque<scoped_refptr<media::VideoFrame> >* frames_; | |
| 31 }; | |
| 32 | |
| 33 #endif // MEDIA_TOOLS_BENCHMARK_PAINTER_H_ | |
| OLD | NEW |