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

Side by Side Diff: include/views/SkOSWindow_Win.h

Issue 1306823003: skia: add ability to load command_buffer_gles2 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: delete the display Created 5 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkOSWindow_Win_DEFINED 10 #ifndef SkOSWindow_Win_DEFINED
(...skipping 19 matching lines...) Expand all
30 30
31 static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay); 31 static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay);
32 32
33 enum SkBackEndTypes { 33 enum SkBackEndTypes {
34 kNone_BackEndType, 34 kNone_BackEndType,
35 #if SK_SUPPORT_GPU 35 #if SK_SUPPORT_GPU
36 kNativeGL_BackEndType, 36 kNativeGL_BackEndType,
37 #if SK_ANGLE 37 #if SK_ANGLE
38 kANGLE_BackEndType, 38 kANGLE_BackEndType,
39 #endif // SK_ANGLE 39 #endif // SK_ANGLE
40 #if SK_COMMAND_BUFFER
41 kCommandBuffer_BackEndType,
42 #endif // SK_COMMAND_BUFFER
40 #endif // SK_SUPPORT_GPU 43 #endif // SK_SUPPORT_GPU
41 }; 44 };
42 45
43 bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*) ; 46 bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*) ;
44 void detach(); 47 void detach();
45 void present(); 48 void present();
46 49
47 bool wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); 50 bool wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
48 static bool QuitOnDeactivate(HWND hWnd); 51 static bool QuitOnDeactivate(HWND hWnd);
49 52
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 private: 86 private:
84 static SkTHashMap<void*, SkOSWindow*> gHwndToOSWindowMap; 87 static SkTHashMap<void*, SkOSWindow*> gHwndToOSWindowMap;
85 88
86 WindowInit fWinInit; 89 WindowInit fWinInit;
87 void* fHWND; 90 void* fHWND;
88 91
89 void doPaint(void* ctx); 92 void doPaint(void* ctx);
90 93
91 #if SK_SUPPORT_GPU 94 #if SK_SUPPORT_GPU
92 void* fHGLRC; 95 void* fHGLRC;
93 #if SK_ANGLE 96 #if SK_ANGLE || SK_COMMAND_BUFFER
94 EGLDisplay fDisplay; 97 EGLDisplay fDisplay;
95 EGLContext fContext; 98 EGLContext fContext;
96 EGLSurface fSurface; 99 EGLSurface fSurface;
97 EGLConfig fConfig; 100 EGLConfig fConfig;
98 #endif // SK_ANGLE 101 #endif // SK_ANGLE || SK_COMMAND_BUFFER
99 #endif // SK_SUPPORT_GPU 102 #endif // SK_SUPPORT_GPU
100 103
101 bool fFullscreen; 104 bool fFullscreen;
102 struct SavedWindowState { 105 struct SavedWindowState {
103 bool fZoomed; 106 bool fZoomed;
104 LONG fStyle; 107 LONG fStyle;
105 LONG fExStyle; 108 LONG fExStyle;
106 RECT fRect; 109 RECT fRect;
107 LONG fScreenWidth; 110 LONG fScreenWidth;
108 LONG fScreenHeight; 111 LONG fScreenHeight;
109 LONG fScreenBits; 112 LONG fScreenBits;
110 void* fHWND; 113 void* fHWND;
111 } fSavedWindowState; 114 } fSavedWindowState;
112 115
113 HMENU fMBar; 116 HMENU fMBar;
114 117
115 SkBackEndTypes fAttached; 118 SkBackEndTypes fAttached;
116 119
117 void updateSize(); 120 void updateSize();
118 #if SK_SUPPORT_GPU 121 #if SK_SUPPORT_GPU
119 bool attachGL(int msaaSampleCount, AttachmentInfo* info); 122 bool attachGL(int msaaSampleCount, AttachmentInfo* info);
120 void detachGL(); 123 void detachGL();
121 void presentGL(); 124 void presentGL();
122 125
123 #if SK_ANGLE 126 #if SK_ANGLE
124 bool attachANGLE(int msaaSampleCount, AttachmentInfo* info); 127 bool attachANGLE(int msaaSampleCount, AttachmentInfo* info);
125 void detachANGLE(); 128 void detachANGLE();
126 void presentANGLE(); 129 void presentANGLE();
127 #endif // SK_ANGLE 130 #endif // SK_ANGLE
131
132 #if SK_COMMAND_BUFFER
133 bool attachCommandBuffer(int msaaSampleCount, AttachmentInfo* info);
134 void detachCommandBuffer();
135 void presentCommandBuffer();
136 #endif // SK_COMMAND_BUFFER
128 #endif // SK_SUPPORT_GPU 137 #endif // SK_SUPPORT_GPU
129 138
130 typedef SkWindow INHERITED; 139 typedef SkWindow INHERITED;
131 }; 140 };
132 141
133 #endif 142 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698