Mercurial > hg > orthanc-stone
comparison Framework/OpenGL/WebAssemblyOpenGLContext.cpp @ 1338:1b24f6b06408 broker
removed obsolete comments
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 03 Apr 2020 16:13:24 +0200 |
parents | 2d8ab34c8c91 |
children | 1b8e37770d78 |
comparison
equal
deleted
inserted
replaced
1337:b1396be5aa27 | 1338:1b24f6b06408 |
---|---|
198 WebAssemblyOpenGLContext::WebAssemblyOpenGLContext(const std::string& canvas) : | 198 WebAssemblyOpenGLContext::WebAssemblyOpenGLContext(const std::string& canvas) : |
199 pimpl_(new PImpl(canvas)) | 199 pimpl_(new PImpl(canvas)) |
200 { | 200 { |
201 } | 201 } |
202 | 202 |
203 //bool WebAssemblyOpenGLContext::TryRecreate() | |
204 //{ | |
205 // // LOG(ERROR) << "WebAssemblyOpenGLContext::TryRecreate() trying to recreate context"; | |
206 // try | |
207 // { | |
208 // std::string canvasId = GetCanvasIdentifier(); | |
209 // pimpl_.reset(new PImpl(canvasId)); | |
210 | |
211 // // no exception does not mean the context is fully | |
212 // // functional! Most probably, if we have >= than 16 | |
213 // // contexts, context wil remain lost for some time | |
214 // bool lost = IsContextLost(); | |
215 // if (lost) { | |
216 // // LOG(ERROR) << "WebAssemblyOpenGLContext::TryRecreate() context is still lost!"; | |
217 // return false; | |
218 // } else { | |
219 // return true; | |
220 // } | |
221 // } | |
222 // catch (const Orthanc::OrthancException& e) | |
223 // { | |
224 // if (e.HasDetails()) | |
225 // { | |
226 // LOG(ERROR) << "OrthancException in WebAssemblyOpenGLContext::TryRecreate: " << e.What() << " Details: " << e.GetDetails(); | |
227 // } | |
228 // else | |
229 // { | |
230 // LOG(ERROR) << "OrthancException in WebAssemblyOpenGLContext::TryRecreate: " << e.What(); | |
231 // } | |
232 // return false; | |
233 // } | |
234 // catch (const std::exception& e) | |
235 // { | |
236 // LOG(ERROR) << "std::exception in WebAssemblyOpenGLContext::TryRecreate: " << e.what(); | |
237 // return false; | |
238 // } | |
239 // catch (...) | |
240 // { | |
241 // LOG(ERROR) << "Unknown exception WebAssemblyOpenGLContext::in TryRecreate"; | |
242 // return false; | |
243 // } | |
244 //} | |
245 | |
246 bool WebAssemblyOpenGLContext::IsContextLost() | 203 bool WebAssemblyOpenGLContext::IsContextLost() |
247 { | 204 { |
248 return pimpl_->IsContextLost(); | 205 return pimpl_->IsContextLost(); |
249 } | 206 } |
250 | 207 |