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

Side by Side Diff: core/cross/gl/renderer_gl.cc

Issue 208037: Added command buffer unit tests to gyp.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 3 months 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
« no previous file with comments | « core/core.gyp ('k') | import/cross/precompile.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 void RendererGL::SetViewportInPixels(int left, 1183 void RendererGL::SetViewportInPixels(int left,
1184 int top, 1184 int top,
1185 int width, 1185 int width,
1186 int height, 1186 int height,
1187 float min_z, 1187 float min_z,
1188 float max_z) { 1188 float max_z) {
1189 MakeCurrentLazy(); 1189 MakeCurrentLazy();
1190 int vieport_top = 1190 int vieport_top =
1191 RenderSurfaceActive() ? top : display_height() - top - height; 1191 RenderSurfaceActive() ? top : display_height() - top - height;
1192 ::glViewport(left, vieport_top, width, height); 1192 ::glViewport(left, vieport_top, width, height);
1193 UpdateHelperConstant(width, height); 1193 UpdateHelperConstant(static_cast<float>(width), static_cast<float>(height));
1194 1194
1195 // If it's the full client area turn off scissor test for speed. 1195 // If it's the full client area turn off scissor test for speed.
1196 if (left == 0 && 1196 if (left == 0 &&
1197 top == 0 && 1197 top == 0 &&
1198 width == display_width() && 1198 width == display_width() &&
1199 height == display_height()) { 1199 height == display_height()) {
1200 ::glDisable(GL_SCISSOR_TEST); 1200 ::glDisable(GL_SCISSOR_TEST);
1201 } else { 1201 } else {
1202 ::glScissor(left, vieport_top, width, height); 1202 ::glScissor(left, vieport_top, width, height);
1203 ::glEnable(GL_SCISSOR_TEST); 1203 ::glEnable(GL_SCISSOR_TEST);
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 return swizzle_table; 1498 return swizzle_table;
1499 } 1499 }
1500 1500
1501 // This is a factory function for creating Renderer objects. Since 1501 // This is a factory function for creating Renderer objects. Since
1502 // we're implementing GL, we only ever return a GL renderer. 1502 // we're implementing GL, we only ever return a GL renderer.
1503 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) { 1503 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) {
1504 return RendererGL::CreateDefault(service_locator); 1504 return RendererGL::CreateDefault(service_locator);
1505 } 1505 }
1506 1506
1507 } // namespace o3d 1507 } // namespace o3d
OLDNEW
« no previous file with comments | « core/core.gyp ('k') | import/cross/precompile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698