Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: media/tools/shader_bench/painter.h

Issue 4873002: Benchmark tool for GPU-accelerated video rendering (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up Window/Painter interface a little Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698