Changeset 46434 in vbox
- Timestamp:
- Jun 7, 2013 11:29:31 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostImpl.cpp
r46340 r46434 210 210 /** @} */ 211 211 212 /* 3D hardware acceleration supported?*/213 BOOLf3DAccelerationSupported;212 /** 3D hardware acceleration supported? Tristate, -1 meaning not probed. */ 213 int f3DAccelerationSupported; 214 214 215 215 HostPowerService *pHostPowerService; … … 379 379 } 380 380 381 /* Test for 3D hardware acceleration support */ 381 #ifdef VBOX_WITH_CROGL 382 /* Test for 3D hardware acceleration support later when (if ever) need. */ 383 m->f3DAccelerationSupported = -1; 384 #else 382 385 m->f3DAccelerationSupported = false; 383 384 #ifdef VBOX_WITH_CROGL 385 m->f3DAccelerationSupported = VBoxOglIs3DAccelerationSupported(); 386 #endif /* VBOX_WITH_CROGL */ 386 #endif 387 387 388 388 #if defined (RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) … … 1145 1145 CheckComArgOutPointerValid(aSupported); 1146 1146 AutoCaller autoCaller(this); 1147 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1148 1149 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1150 1151 *aSupported = m->f3DAccelerationSupported; 1147 HRESULT hrc = autoCaller.rc(); 1148 if (SUCCEEDED(hrc)) 1149 { 1150 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1151 if (m->f3DAccelerationSupported != -1) 1152 *aSupported = m->f3DAccelerationSupported; 1153 else 1154 { 1155 alock.release(); 1156 #ifdef VBOX_WITH_CROGL 1157 bool fSupported = VBoxOglIs3DAccelerationSupported(); 1158 #else 1159 bool fSupported = false; /* shoudn't get here, but just in case. */ 1160 #endif 1161 AutoWriteLock alock2(this COMMA_LOCKVAL_SRC_POS); 1162 m->f3DAccelerationSupported = fSupported; 1163 alock2.release(); 1164 1165 *aSupported = fSupported; 1166 } 1167 } 1152 1168 1153 1169 #ifdef DEBUG_misha … … 1155 1171 #endif 1156 1172 1157 return S_OK;1173 return hrc; 1158 1174 } 1159 1175
Note:
See TracChangeset
for help on using the changeset viewer.