@@ -180,9 +180,11 @@ bool PiDisplay::OnApplicationContextMakeCurrent() {
180180  }
181181  if  (::eglMakeCurrent (display_, surface_, surface_, context_) != EGL_TRUE) {
182182    FLWAY_ERROR << " Could not make the context current." 
183- 
184183    return  false ;
184+   } else  {
185+     FLWAY_LOG << " call OnApplicationContextMakeCurrent" 
185186  }
187+ 
186188  return  true ;
187189}
188190
@@ -196,6 +198,8 @@ bool PiDisplay::OnApplicationContextClearCurrent() {
196198                       EGL_NO_CONTEXT) != EGL_TRUE) {
197199    FLWAY_ERROR << " Could not clear the current context." 
198200    return  false ;
201+   } else  {
202+     FLWAY_LOG << " call OnApplicationContextClearCurrent" 
199203  }
200204  return  true ;
201205}
@@ -210,11 +214,30 @@ bool PiDisplay::OnApplicationPresent() {
210214  if  (::eglSwapBuffers (display_, surface_) != EGL_TRUE) {
211215    FLWAY_ERROR << " Could not swap buffers to present the screen." 
212216    return  false ;
217+   } else  {
218+     FLWAY_LOG << " call OnApplicationPresent" 
213219  }
214220
215221  return  true ;
216222}
217223
224+ //  |FlutterApplication::RenderDelegate|
225+ bool  PiDisplay::OnApplicationMakeResourceCurrent (){
226+   if  (!valid_) {
227+     FLWAY_ERROR << " Cannot make resource current an invalid display." 
228+     return  false ;
229+   }
230+         
231+   if  (::eglMakeCurrent (display_, surface_, surface_, context_) != EGL_TRUE) {
232+     FLWAY_ERROR << " Could not make resource current." 
233+     return  false ;
234+   } else  {
235+     FLWAY_LOG << " call OnApplicationMakeResourceCurrent" 
236+   }
237+   
238+   return  true ;
239+ }
240+ 
218241//  |FlutterApplication::RenderDelegate|
219242uint32_t  PiDisplay::OnApplicationGetOnscreenFBO () {
220243  //  Just FBO0.
@@ -228,6 +251,7 @@ void *PiDisplay::GetProcAddress(const char *name) {
228251  }
229252
230253  if  (auto  address = dlsym (RTLD_DEFAULT, name)) {
254+     FLWAY_LOG << " call GetProcAddress:" 
231255    return  address;
232256  }
233257
0 commit comments