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

Side by Side Diff: ui/gfx/gl/gl_surface_wgl.cc

Issue 7598013: Do not allocate depth-stencil buffers for GLSurfaces. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 | « ui/gfx/gl/gl_surface_glx.cc ('k') | no next file » | 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) 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
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
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_surface_glx.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698