Chromium Code Reviews

Unified Diff: core/cross/gl/renderer_gl.cc

Issue 210005: Rewrote full-screen support on Windows. O3D now always creates its own... (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.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « core/cross/gl/renderer_gl.h ('k') | core/cross/renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/cross/gl/renderer_gl.cc
===================================================================
--- core/cross/gl/renderer_gl.cc (revision 26426)
+++ core/cross/gl/renderer_gl.cc (working copy)
@@ -651,8 +651,6 @@
new BlendEquationHandler(&blend_equation_[ALPHA]));
}
-RendererGL *RendererGL::current_renderer_ = NULL;
-
RendererGL::~RendererGL() {
Destroy();
}
@@ -1101,7 +1099,6 @@
DestroyCommonGL();
if (display_) {
::glXMakeCurrent(display_, 0, 0);
- current_renderer_ = NULL;
if (context_) {
::glXDestroyContext(display_, context_);
context_ = 0;
@@ -1117,17 +1114,14 @@
#ifdef OS_WIN
if (!device_context_ || !gl_context_) return false;
bool result = ::wglMakeCurrent(device_context_, gl_context_) != 0;
- if (result) current_renderer_ = this;
return result;
#endif
#ifdef OS_MACOSX
if (mac_cgl_context_ != NULL) {
::CGLSetCurrentContext(mac_cgl_context_);
- current_renderer_ = this;
return true;
} else if (mac_agl_context_ != NULL) {
::aglSetCurrentContext(mac_agl_context_);
- current_renderer_ = this;
return true;
} else {
return false;
@@ -1136,7 +1130,6 @@
#ifdef OS_LINUX
if (context_ != NULL) {
bool result = ::glXMakeCurrent(display_, window_, context_) == True;
- if (result) current_renderer_ = this;
return result;
} else {
return false;
@@ -1219,15 +1212,18 @@
CHECK_GL_ERROR();
}
-bool RendererGL::SetFullscreen(bool fullscreen,
- const DisplayWindow& display,
- int mode_id) {
- if (fullscreen != fullscreen_) {
- fullscreen_ = fullscreen;
- }
+bool RendererGL::GoFullscreen(const DisplayWindow& display,
+ int mode_id) {
+ fullscreen_ = true;
return true;
}
+bool RendererGL::CancelFullscreen(const DisplayWindow& display,
+ int width, int height) {
+ fullscreen_ = false;
+ return true;
+}
+
bool RendererGL::PlatformSpecificStartRendering() {
DLOG_FIRST_N(INFO, 10) << "RendererGL StartRendering";
MakeCurrentLazy();
« no previous file with comments | « core/cross/gl/renderer_gl.h ('k') | core/cross/renderer.h » ('j') | no next file with comments »

Powered by Google App Engine