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

Unified Diff: media/tools/shader_bench/gpu_painter.h

Issue 4873002: Benchmark tool for GPU-accelerated video rendering (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added more shaders, used message loop, and cleaned up code 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 side-by-side diff with in-line comments
Download patch
Index: media/tools/shader_bench/gpu_painter.h
diff --git a/media/tools/shader_bench/gpu_painter.h b/media/tools/shader_bench/gpu_painter.h
new file mode 100644
index 0000000000000000000000000000000000000000..91a8b51d61ae2ceecdb1abc5233953e371dad724
--- /dev/null
+++ b/media/tools/shader_bench/gpu_painter.h
@@ -0,0 +1,26 @@
+// 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_GPU_PAINTER_H_
+#define MEDIA_TOOLS_BENCHMARK_GPU_PAINTER_H_
+
+#include "app/gfx/gl/gl_bindings.h"
+#include "app/gfx/gl/gl_context.h"
+#include "app/gfx/gl/gl_implementation.h"
+#include "media/tools/shader_bench/painter.h"
+
+// Class that renders video frames to a window via GPU.
+class GPUPainter : public Painter {
Alpha Left Google 2010/11/19 23:33:51 also mention how this is shared between different
vrk (LEFT CHROMIUM) 2010/11/24 22:01:30 I'm not quite sure if I understand... The static m
+ public:
+ virtual void SetGLContext(gfx::GLContext* context);
+ protected:
+ static GLuint LoadShader(gfx::GLContext* context, unsigned type,
+ const char* shader_source);
+ static GLuint CreateShaderProgram(gfx::GLContext* context,
+ const char* vertex_shader_source,
+ const char* fragment_shader_source);
+ gfx::GLContext* context_;
+};
Alpha Left Google 2010/11/19 23:33:51 disallow_copy_and_assign
vrk (LEFT CHROMIUM) 2010/11/24 22:01:30 Done.
+
+#endif // MEDIA_TOOLS_BENCHMARK_GPU_PAINTER_H_

Powered by Google App Engine
This is Rietveld 408576698