| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <deque> | 5 #include <deque> |
| 6 #include <iostream> | 6 #include <iostream> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 | 9 |
| 10 #include "app/gfx/gl/gl_bindings.h" | 10 #include "app/gfx/gl/gl_bindings.h" |
| 11 #include "app/gfx/gl/gl_context.h" | 11 #include "app/gfx/gl/gl_context.h" |
| 12 #include "app/gfx/gl/gl_implementation.h" | 12 #include "app/gfx/gl/gl_implementation.h" |
| 13 #include "base/at_exit.h" | 13 #include "base/at_exit.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/scoped_ptr.h" | 15 #include "base/scoped_ptr.h" |
| 16 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
| 17 #include "base/time.h" | 17 #include "base/time.h" |
| 18 #include "gfx/native_widget_types.h" | |
| 19 #include "media/base/callback.h" | 18 #include "media/base/callback.h" |
| 20 #include "media/base/video_frame.h" | 19 #include "media/base/video_frame.h" |
| 21 #include "media/tools/shader_bench/cpu_color_painter.h" | 20 #include "media/tools/shader_bench/cpu_color_painter.h" |
| 22 #include "media/tools/shader_bench/gpu_color_painter.h" | 21 #include "media/tools/shader_bench/gpu_color_painter.h" |
| 23 #include "media/tools/shader_bench/gpu_color_painter_exp.h" | 22 #include "media/tools/shader_bench/gpu_color_painter_exp.h" |
| 24 #include "media/tools/shader_bench/painter.h" | 23 #include "media/tools/shader_bench/painter.h" |
| 25 #include "media/tools/shader_bench/window.h" | 24 #include "media/tools/shader_bench/window.h" |
| 25 #include "ui/gfx/native_widget_types.h" |
| 26 | 26 |
| 27 #if defined(OS_LINUX) | 27 #if defined(OS_LINUX) |
| 28 #include <gtk/gtk.h> | 28 #include <gtk/gtk.h> |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 static const int kNumFramesToPaint = 500; | 31 static const int kNumFramesToPaint = 500; |
| 32 static base::TimeTicks g_start_; | 32 static base::TimeTicks g_start_; |
| 33 static base::TimeTicks g_end_; | 33 static base::TimeTicks g_end_; |
| 34 | 34 |
| 35 long CalculateYUVFrameSize(FILE* file_handle, int num_frames) { | 35 long CalculateYUVFrameSize(FILE* file_handle, int num_frames) { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 scoped_ptr<GPUPainter> painter(painters[i].painter); | 154 scoped_ptr<GPUPainter> painter(painters[i].painter); |
| 155 painter->LoadFrames(&frames); | 155 painter->LoadFrames(&frames); |
| 156 painter->SetGLContext(context); | 156 painter->SetGLContext(context); |
| 157 painter->Initialize(width, height); | 157 painter->Initialize(width, height); |
| 158 printf("Running %s tests...", painters[i].name); | 158 printf("Running %s tests...", painters[i].name); |
| 159 RunTest(window.get(), painter.get()); | 159 RunTest(window.get(), painter.get()); |
| 160 } | 160 } |
| 161 | 161 |
| 162 return 0; | 162 return 0; |
| 163 } | 163 } |
| OLD | NEW |