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

Side by Side Diff: src/utils/win/SkWGL.h

Issue 2041943002: SkLeanWindows.h: #include "Windows.h" fewer places (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-06-07 (Tuesday) 11:28:42 EDT Created 4 years, 6 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
« no previous file with comments | « src/utils/win/SkIStream.cpp ('k') | src/views/win/SkOSWindow_win.cpp » ('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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkRefCnt.h" 8 #include "SkRefCnt.h"
9 9
10 #ifndef SkWGL_DEFINED 10 #ifndef SkWGL_DEFINED
11 #define SkWGL_DEFINED 11 #define SkWGL_DEFINED
12 12
13 #include "SkLeanWindows.h"
14
13 /** 15 /**
14 * Working with WGL extensions can be a pain. Among the reasons is that You must 16 * Working with WGL extensions can be a pain. Among the reasons is that You must
15 * have a GL context to get the proc addresses, but you want to use the procs to 17 * have a GL context to get the proc addresses, but you want to use the procs to
16 * create a context in the first place. So you have to create a dummy GL ctx to 18 * create a context in the first place. So you have to create a dummy GL ctx to
17 * get the proc addresses. 19 * get the proc addresses.
18 * 20 *
19 * This file helps by providing SkCreateWGLInterface(). It returns a struct of 21 * This file helps by providing SkCreateWGLInterface(). It returns a struct of
20 * function pointers that it initializes. It also has a helper function to query 22 * function pointers that it initializes. It also has a helper function to query
21 * for WGL extensions. It handles the fact that wglGetExtensionsString is itself 23 * for WGL extensions. It handles the fact that wglGetExtensionsString is itself
22 * an extension. 24 * an extension.
23 */ 25 */
24 26
25 #if !defined(WIN32_LEAN_AND_MEAN)
26 #define WIN32_LEAN_AND_MEAN
27 #define SK_LOCAL_LEAN_AND_MEAN
28 #endif
29 #include <windows.h>
30 #if defined(SK_LOCAL_LEAN_AND_MEAN)
31 #undef WIN32_LEAN_AND_MEAN
32 #undef SK_LOCAL_LEAN_AND_MEAN
33 #endif
34
35 #define SK_WGL_DRAW_TO_WINDOW 0x2001 27 #define SK_WGL_DRAW_TO_WINDOW 0x2001
36 #define SK_WGL_ACCELERATION 0x2003 28 #define SK_WGL_ACCELERATION 0x2003
37 #define SK_WGL_SUPPORT_OPENGL 0x2010 29 #define SK_WGL_SUPPORT_OPENGL 0x2010
38 #define SK_WGL_DOUBLE_BUFFER 0x2011 30 #define SK_WGL_DOUBLE_BUFFER 0x2011
39 #define SK_WGL_COLOR_BITS 0x2014 31 #define SK_WGL_COLOR_BITS 0x2014
40 #define SK_WGL_RED_BITS 0x2015 32 #define SK_WGL_RED_BITS 0x2015
41 #define SK_WGL_GREEN_BITS 0x2017 33 #define SK_WGL_GREEN_BITS 0x2017
42 #define SK_WGL_BLUE_BITS 0x2019 34 #define SK_WGL_BLUE_BITS 0x2019
43 #define SK_WGL_ALPHA_BITS 0x201B 35 #define SK_WGL_ALPHA_BITS 0x201B
44 #define SK_WGL_STENCIL_BITS 0x2023 36 #define SK_WGL_STENCIL_BITS 0x2023
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 private: 153 private:
162 SkWGLPbufferContext(HPBUFFER pbuffer, HDC dc, HGLRC glrc); 154 SkWGLPbufferContext(HPBUFFER pbuffer, HDC dc, HGLRC glrc);
163 155
164 HPBUFFER fPbuffer; 156 HPBUFFER fPbuffer;
165 HDC fDC; 157 HDC fDC;
166 HGLRC fGLRC; 158 HGLRC fGLRC;
167 SkWGLExtensions fExtensions; 159 SkWGLExtensions fExtensions;
168 }; 160 };
169 161
170 #endif 162 #endif
OLDNEW
« no previous file with comments | « src/utils/win/SkIStream.cpp ('k') | src/views/win/SkOSWindow_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698