OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This tool is used to benchmark the render model used by the compositor | 5 // This tool is used to benchmark the render model used by the compositor |
6 | 6 |
7 // Most of this file is derived from the source of the tile_render_bench tool, | 7 // Most of this file is derived from the source of the tile_render_bench tool, |
8 // and has been changed to support running a sequence of independent | 8 // and has been changed to support running a sequence of independent |
9 // simulations for our different render models and test cases. | 9 // simulations for our different render models and test cases. |
10 | 10 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 ExposureMask | KeyPressMask | StructureNotifyMask); | 179 ExposureMask | KeyPressMask | StructureNotifyMask); |
180 XMapWindow(display_, window_); | 180 XMapWindow(display_, window_); |
181 | 181 |
182 XResizeWindow(display_, window_, WINDOW_WIDTH, WINDOW_HEIGHT); | 182 XResizeWindow(display_, window_, WINDOW_WIDTH, WINDOW_HEIGHT); |
183 | 183 |
184 return true; | 184 return true; |
185 } | 185 } |
186 | 186 |
187 // Initialize the OpenGL context. | 187 // Initialize the OpenGL context. |
188 bool InitGLContext() { | 188 bool InitGLContext() { |
189 if (!InitializeGLBindings(gfx::kGLImplementationDesktopGL)) { | 189 if (!InitializeStaticGLBindings(gfx::kGLImplementationDesktopGL)) { |
190 LOG(FATAL) << "InitializeGLBindings failed"; | 190 LOG(FATAL) << "InitializeStaticGLBindings failed"; |
191 return false; | 191 return false; |
192 } | 192 } |
193 | 193 |
194 XWindowAttributes attributes; | 194 XWindowAttributes attributes; |
195 XGetWindowAttributes(display_, window_, &attributes); | 195 XGetWindowAttributes(display_, window_, &attributes); |
196 XVisualInfo visual_info_template; | 196 XVisualInfo visual_info_template; |
197 visual_info_template.visualid = XVisualIDFromVisual(attributes.visual); | 197 visual_info_template.visualid = XVisualIDFromVisual(attributes.visual); |
198 int visual_info_count = 0; | 198 int visual_info_count = 0; |
199 XVisualInfo* visual_info_list = XGetVisualInfo(display_, VisualIDMask, | 199 XVisualInfo* visual_info_list = XGetVisualInfo(display_, VisualIDMask, |
200 &visual_info_template, | 200 &visual_info_template, |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 } | 393 } |
394 } else { | 394 } else { |
395 LOG(INFO) << "(input path is a file)"; | 395 LOG(INFO) << "(input path is a file)"; |
396 sim.QueueTest(inPath); | 396 sim.QueueTest(inPath); |
397 } | 397 } |
398 | 398 |
399 sim.Run(); | 399 sim.Run(); |
400 | 400 |
401 return 0; | 401 return 0; |
402 } | 402 } |
OLD | NEW |