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

Side by Side Diff: gpu/tools/compositor_model_bench/compositor_model_bench.cc

Issue 94963003: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Improve Windows initialization and renderBufferMultisample explanation Created 7 years 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
« no previous file with comments | « gpu/config/gpu_info_collector_unittest.cc ('k') | media/tools/player_x11/gl_video_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 ExposureMask | KeyPressMask | StructureNotifyMask); 181 ExposureMask | KeyPressMask | StructureNotifyMask);
182 XMapWindow(display_, window_); 182 XMapWindow(display_, window_);
183 183
184 XResizeWindow(display_, window_, WINDOW_WIDTH, WINDOW_HEIGHT); 184 XResizeWindow(display_, window_, WINDOW_WIDTH, WINDOW_HEIGHT);
185 185
186 return true; 186 return true;
187 } 187 }
188 188
189 // Initialize the OpenGL context. 189 // Initialize the OpenGL context.
190 bool InitGLContext() { 190 bool InitGLContext() {
191 if (!InitializeGLBindings(gfx::kGLImplementationDesktopGL)) { 191 if (!InitializeStaticGLBindings(gfx::kGLImplementationDesktopGL)) {
192 LOG(FATAL) << "InitializeGLBindings failed"; 192 LOG(FATAL) << "InitializeStaticGLBindings failed";
193 return false; 193 return false;
194 } 194 }
195 195
196 XWindowAttributes attributes; 196 XWindowAttributes attributes;
197 XGetWindowAttributes(display_, window_, &attributes); 197 XGetWindowAttributes(display_, window_, &attributes);
198 XVisualInfo visual_info_template; 198 XVisualInfo visual_info_template;
199 visual_info_template.visualid = XVisualIDFromVisual(attributes.visual); 199 visual_info_template.visualid = XVisualIDFromVisual(attributes.visual);
200 int visual_info_count = 0; 200 int visual_info_count = 0;
201 XVisualInfo* visual_info_list = XGetVisualInfo(display_, VisualIDMask, 201 XVisualInfo* visual_info_list = XGetVisualInfo(display_, VisualIDMask,
202 &visual_info_template, 202 &visual_info_template,
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 } else { 396 } else {
397 LOG(INFO) << "(input path is a file)"; 397 LOG(INFO) << "(input path is a file)";
398 sim.QueueTest(inPath); 398 sim.QueueTest(inPath);
399 } 399 }
400 400
401 sim.Run(); 401 sim.Run();
402 402
403 return 0; 403 return 0;
404 } 404 }
OLDNEW
« no previous file with comments | « gpu/config/gpu_info_collector_unittest.cc ('k') | media/tools/player_x11/gl_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698