| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/gfx/gl/gl_surface_wgl.h" | 5 #include "ui/gfx/gl/gl_surface_wgl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/gfx/gl/gl_bindings.h" | 8 #include "ui/gfx/gl/gl_bindings.h" |
| 9 #include "ui/gfx/gl/gl_implementation.h" | 9 #include "ui/gfx/gl/gl_implementation.h" |
| 10 | 10 |
| 11 namespace gfx { | 11 namespace gfx { |
| 12 | 12 |
| 13 static ATOM g_class_registration; | 13 static ATOM g_class_registration; |
| 14 static HWND g_window; | 14 static HWND g_window; |
| 15 HDC g_display_dc; | 15 HDC g_display_dc; |
| 16 static int g_pixel_format = 0; | 16 static int g_pixel_format = 0; |
| 17 | 17 |
| 18 const PIXELFORMATDESCRIPTOR kPixelFormatDescriptor = { | 18 const PIXELFORMATDESCRIPTOR kPixelFormatDescriptor = { |
| 19 sizeof(kPixelFormatDescriptor), // Size of structure. | 19 sizeof(kPixelFormatDescriptor), // Size of structure. |
| 20 1, // Default version. | 20 1, // Default version. |
| 21 PFD_DRAW_TO_WINDOW | // Window drawing support. | 21 PFD_DRAW_TO_WINDOW | // Window drawing support. |
| 22 PFD_SUPPORT_OPENGL | // OpenGL support. | 22 PFD_SUPPORT_OPENGL | // OpenGL support. |
| 23 PFD_DOUBLEBUFFER, // Double buffering support (not stereo). | 23 PFD_DOUBLEBUFFER, // Double buffering support (not stereo). |
| 24 PFD_TYPE_RGBA, // RGBA color mode (not indexed). | 24 PFD_TYPE_RGBA, // RGBA color mode (not indexed). |
| 25 24, // 24 bit color mode. | 25 24, // 24 bit color mode. |
| 26 0, 0, 0, 0, 0, 0, // Don't set RGB bits & shifts. | 26 0, 0, 0, 0, 0, 0, // Don't set RGB bits & shifts. |
| 27 8, 0, // 8 bit alpha | 27 8, 0, // 8 bit alpha |
| 28 0, // No accumulation buffer. | 28 0, // No accumulation buffer. |
| 29 0, 0, 0, 0, // Ignore accumulation bits. | 29 0, 0, 0, 0, // Ignore accumulation bits. |
| 30 24, // 24 bit z-buffer size. | 30 0, // no z-buffer. |
| 31 8, // 8-bit stencil buffer. | 31 0, // no stencil buffer. |
| 32 0, // No aux buffer. | 32 0, // No aux buffer. |
| 33 PFD_MAIN_PLANE, // Main drawing plane (not overlay). | 33 PFD_MAIN_PLANE, // Main drawing plane (not overlay). |
| 34 0, // Reserved. | 34 0, // Reserved. |
| 35 0, 0, 0, // Layer masks ignored. | 35 0, 0, 0, // Layer masks ignored. |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 static LRESULT CALLBACK IntermediateWindowProc(HWND window, | 38 static LRESULT CALLBACK IntermediateWindowProc(HWND window, |
| 39 UINT message, | 39 UINT message, |
| 40 WPARAM w_param, | 40 WPARAM w_param, |
| 41 LPARAM l_param) { | 41 LPARAM l_param) { |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 333 |
| 334 gfx::Size PbufferGLSurfaceWGL::GetSize() { | 334 gfx::Size PbufferGLSurfaceWGL::GetSize() { |
| 335 return size_; | 335 return size_; |
| 336 } | 336 } |
| 337 | 337 |
| 338 void* PbufferGLSurfaceWGL::GetHandle() { | 338 void* PbufferGLSurfaceWGL::GetHandle() { |
| 339 return device_context_; | 339 return device_context_; |
| 340 } | 340 } |
| 341 | 341 |
| 342 } // namespace gfx | 342 } // namespace gfx |
| OLD | NEW |