2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 #include <dali/internal/graphics/gles/egl-implementation.h>
24 #include <dali/integration-api/debug.h>
25 #include <dali/public-api/common/dali-vector.h>
28 #include <dali/public-api/dali-adaptor-common.h>
29 #include <dali/internal/graphics/gles/gl-implementation.h>
30 #include <dali/internal/graphics/gles/egl-debug.h>
32 // EGL constants use C style casts
33 #pragma GCC diagnostic push
34 #pragma GCC diagnostic ignored "-Wold-style-cast"
38 const uint32_t THRESHOLD_SWAPBUFFER_COUNT = 5;
39 const uint32_t CHECK_EXTENSION_NUMBER = 4;
40 const uint32_t EGL_VERSION_SUPPORT_SURFACELESS_CONTEXT = 15;
41 const std::string EGL_KHR_SURFACELESS_CONTEXT = "EGL_KHR_surfaceless_context";
42 const std::string EGL_KHR_CREATE_CONTEXT = "EGL_KHR_create_context";
43 const std::string EGL_KHR_PARTIAL_UPDATE = "EGL_KHR_partial_update";
44 const std::string EGL_KHR_SWAP_BUFFERS_WITH_DAMAGE = "EGL_KHR_swap_buffers_with_damage";
57 #define TEST_EGL_ERROR(lastCommand) \
59 EGLint err = eglGetError(); \
60 if (err != EGL_SUCCESS) \
62 DALI_LOG_ERROR("EGL error after %s\n", lastCommand); \
63 Egl::PrintError(err); \
64 DALI_ASSERT_ALWAYS(0 && "EGL error"); \
68 EglImplementation::EglImplementation( int multiSamplingLevel,
69 Integration::DepthBufferAvailable depthBufferRequired,
70 Integration::StencilBufferAvailable stencilBufferRequired ,
71 Integration::PartialUpdateAvailable partialUpdateRequired )
73 mEglNativeDisplay( 0 ),
74 mEglNativeWindow( 0 ),
75 mCurrentEglNativePixmap( 0 ),
79 mCurrentEglSurface( 0 ),
80 mCurrentEglContext( EGL_NO_CONTEXT ),
81 mMultiSamplingLevel( multiSamplingLevel ),
83 mColorDepth( COLOR_DEPTH_24 ),
84 mGlesInitialized( false ),
85 mIsOwnSurface( true ),
87 mDepthBufferRequired( depthBufferRequired == Integration::DepthBufferAvailable::TRUE ),
88 mStencilBufferRequired( stencilBufferRequired == Integration::StencilBufferAvailable::TRUE ),
89 mPartialUpdateRequired( partialUpdateRequired == Integration::PartialUpdateAvailable::TRUE ),
90 mIsSurfacelessContextSupported( false ),
91 mIsKhrCreateContextSupported( false ),
92 mSwapBufferCountAfterResume( 0 ),
93 mEglSetDamageRegionKHR( 0 ),
94 mEglSwapBuffersWithDamageKHR( 0 )
98 EglImplementation::~EglImplementation()
103 bool EglImplementation::InitializeGles( EGLNativeDisplayType display, bool isOwnSurface )
105 if ( !mGlesInitialized )
107 mEglNativeDisplay = display;
109 // Try to get the display connection for the native display first
110 mEglDisplay = eglGetDisplay( mEglNativeDisplay );
112 if( mEglDisplay == EGL_NO_DISPLAY )
114 // If failed, try to get the default display connection
115 mEglDisplay = eglGetDisplay( EGL_DEFAULT_DISPLAY );
118 if( mEglDisplay == EGL_NO_DISPLAY )
120 // Still failed to get a display connection
121 throw Dali::DaliException( "", "OpenGL ES is not supported");
124 EGLint majorVersion = 0;
125 EGLint minorVersion = 0;
126 if ( !eglInitialize( mEglDisplay, &majorVersion, &minorVersion ) )
130 eglBindAPI(EGL_OPENGL_ES_API);
132 mIsOwnSurface = isOwnSurface;
135 const char* const versionStr = eglQueryString( mEglDisplay, EGL_VERSION );
136 const char* const extensionStr = eglQueryString( mEglDisplay, EGL_EXTENSIONS );
138 // Query EGL extensions to check whether required extensions are supported
139 std::istringstream versionStream( versionStr );
140 std::string majorVersion, minorVersion;
141 std::getline( versionStream, majorVersion, '.' );
142 std::getline( versionStream, minorVersion );
143 uint32_t extensionCheckCount = 0;
144 if( stoul( majorVersion ) * 10 + stoul( minorVersion ) >= EGL_VERSION_SUPPORT_SURFACELESS_CONTEXT )
146 mIsSurfacelessContextSupported = true;
147 mIsKhrCreateContextSupported = true;
148 extensionCheckCount += 2;
151 std::istringstream stream(extensionStr);
152 std::string currentExtension;
153 bool isKhrPartialUpdateSupported = false;
154 bool isKhrSwapBuffersWithDamageSupported = false;
155 while(std::getline(stream, currentExtension, ' ') && extensionCheckCount < CHECK_EXTENSION_NUMBER)
157 if(currentExtension == EGL_KHR_SURFACELESS_CONTEXT && !mIsSurfacelessContextSupported)
159 mIsSurfacelessContextSupported = true;
160 extensionCheckCount++;
162 if(currentExtension == EGL_KHR_CREATE_CONTEXT && !mIsKhrCreateContextSupported)
164 mIsKhrCreateContextSupported = true;
165 extensionCheckCount++;
167 if(currentExtension == EGL_KHR_PARTIAL_UPDATE)
169 isKhrPartialUpdateSupported = true;
170 extensionCheckCount++;
172 if(currentExtension == EGL_KHR_SWAP_BUFFERS_WITH_DAMAGE)
174 isKhrSwapBuffersWithDamageSupported = true;
175 extensionCheckCount++;
179 if(!isKhrPartialUpdateSupported || !isKhrSwapBuffersWithDamageSupported)
181 mPartialUpdateRequired = false;
184 mGlesInitialized = true;
186 // We want to display this information all the time, so use the LogMessage directly
187 Integration::Log::LogMessage(Integration::Log::DebugInfo, "EGL Information\n"
188 " PartialUpdate %d\n"
193 mPartialUpdateRequired,
194 eglQueryString( mEglDisplay, EGL_VENDOR ),
196 eglQueryString( mEglDisplay, EGL_CLIENT_APIS ),
199 return mGlesInitialized;
202 bool EglImplementation::CreateContext()
204 // make sure a context isn't created twice
205 DALI_ASSERT_ALWAYS( (mEglContext == 0) && "EGL context recreated" );
207 mEglContext = eglCreateContext(mEglDisplay, mEglConfig, NULL, &(mContextAttribs[0]));
208 TEST_EGL_ERROR("eglCreateContext render thread");
210 DALI_ASSERT_ALWAYS( EGL_NO_CONTEXT != mEglContext && "EGL context not created" );
212 DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_VENDOR : %s ***\n", glGetString(GL_VENDOR));
213 DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_RENDERER : %s ***\n", glGetString(GL_RENDERER));
214 DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_VERSION : %s ***\n", glGetString(GL_VERSION));
215 DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_SHADING_LANGUAGE_VERSION : %s***\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
216 DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** Supported Extensions ***\n%s\n\n", glGetString(GL_EXTENSIONS));
218 mEglSetDamageRegionKHR = reinterpret_cast<PFNEGLSETDAMAGEREGIONKHRPROC>(eglGetProcAddress("eglSetDamageRegionKHR"));
219 if (!mEglSetDamageRegionKHR)
221 DALI_LOG_ERROR("Coudn't find eglSetDamageRegionKHR!\n");
222 mPartialUpdateRequired = false;
224 mEglSwapBuffersWithDamageKHR = reinterpret_cast<PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC>(eglGetProcAddress("eglSwapBuffersWithDamageKHR"));
225 if (!mEglSwapBuffersWithDamageKHR)
227 DALI_LOG_ERROR("Coudn't find eglSwapBuffersWithDamageKHR!\n");
228 mPartialUpdateRequired = false;
233 bool EglImplementation::CreateWindowContext( EGLContext& eglContext )
235 // make sure a context isn't created twice
236 DALI_ASSERT_ALWAYS( (eglContext == 0) && "EGL context recreated" );
238 eglContext = eglCreateContext(mEglDisplay, mEglConfig, mEglContext, &(mContextAttribs[0]));
239 TEST_EGL_ERROR("eglCreateContext render thread");
241 DALI_ASSERT_ALWAYS( EGL_NO_CONTEXT != eglContext && "EGL context not created" );
243 DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_VENDOR : %s ***\n", glGetString(GL_VENDOR));
244 DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_RENDERER : %s ***\n", glGetString(GL_RENDERER));
245 DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_VERSION : %s ***\n", glGetString(GL_VERSION));
246 DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_SHADING_LANGUAGE_VERSION : %s***\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
247 DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** Supported Extensions ***\n%s\n\n", glGetString(GL_EXTENSIONS));
249 mEglWindowContexts.push_back( eglContext );
251 mEglSetDamageRegionKHR = reinterpret_cast<PFNEGLSETDAMAGEREGIONKHRPROC>(eglGetProcAddress("eglSetDamageRegionKHR"));
252 if (!mEglSetDamageRegionKHR)
254 DALI_LOG_ERROR("Coudn't find eglSetDamageRegionKHR!\n");
255 mPartialUpdateRequired = false;
257 mEglSwapBuffersWithDamageKHR = reinterpret_cast<PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC>(eglGetProcAddress("eglSwapBuffersWithDamageKHR"));
258 if (!mEglSwapBuffersWithDamageKHR)
260 DALI_LOG_ERROR("Coudn't find eglSwapBuffersWithDamageKHR!\n");
261 mPartialUpdateRequired = false;
266 void EglImplementation::DestroyContext( EGLContext& eglContext )
270 eglDestroyContext( mEglDisplay, eglContext );
275 void EglImplementation::DestroySurface( EGLSurface& eglSurface )
277 if(mIsOwnSurface && eglSurface)
279 // Make context null to prevent crash in driver side
281 eglDestroySurface( mEglDisplay, eglSurface );
286 void EglImplementation::MakeContextCurrent( EGLSurface eglSurface, EGLContext eglContext )
288 if (mCurrentEglContext == eglContext)
293 mCurrentEglSurface = eglSurface;
297 eglMakeCurrent( mEglDisplay, eglSurface, eglSurface, eglContext );
299 mCurrentEglContext = eglContext;
302 EGLint error = eglGetError();
304 if ( error != EGL_SUCCESS )
306 Egl::PrintError(error);
308 DALI_ASSERT_ALWAYS(false && "MakeContextCurrent failed!");
312 void EglImplementation::MakeCurrent( EGLNativePixmapType pixmap, EGLSurface eglSurface )
314 if (mCurrentEglContext == mEglContext)
319 mCurrentEglNativePixmap = pixmap;
320 mCurrentEglSurface = eglSurface;
324 eglMakeCurrent( mEglDisplay, eglSurface, eglSurface, mEglContext );
326 mCurrentEglContext = mEglContext;
329 EGLint error = eglGetError();
331 if ( error != EGL_SUCCESS )
333 Egl::PrintError(error);
335 DALI_ASSERT_ALWAYS(false && "MakeCurrent failed!");
339 void EglImplementation::MakeContextNull()
341 // clear the current context
342 eglMakeCurrent( mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
343 mCurrentEglContext = EGL_NO_CONTEXT;
346 void EglImplementation::TerminateGles()
348 if ( mGlesInitialized )
350 // Make context null to prevent crash in driver side
353 for ( auto eglSurface : mEglWindowSurfaces )
355 if(mIsOwnSurface && eglSurface)
357 eglDestroySurface(mEglDisplay, eglSurface);
360 eglDestroyContext(mEglDisplay, mEglContext);
361 for ( auto eglContext : mEglWindowContexts )
363 eglDestroyContext(mEglDisplay, eglContext);
366 eglTerminate(mEglDisplay);
371 mCurrentEglSurface = NULL;
372 mCurrentEglContext = EGL_NO_CONTEXT;
374 mGlesInitialized = false;
378 bool EglImplementation::IsGlesInitialized() const
380 return mGlesInitialized;
383 void EglImplementation::SwapBuffers( EGLSurface& eglSurface )
385 if ( eglSurface != EGL_NO_SURFACE ) // skip if using surfaceless context
387 #ifndef DALI_PROFILE_UBUNTU
388 if( mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT )
390 DALI_LOG_RELEASE_INFO( "EglImplementation::SwapBuffers started.\n" );
392 #endif //DALI_PROFILE_UBUNTU
394 // DALI_LOG_ERROR("EglImplementation::SwapBuffers()\n");
395 eglSwapBuffers( mEglDisplay, eglSurface );
397 #ifndef DALI_PROFILE_UBUNTU
398 if( mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT )
400 DALI_LOG_RELEASE_INFO( "EglImplementation::SwapBuffers finished.\n" );
401 mSwapBufferCountAfterResume++;
403 #endif //DALI_PROFILE_UBUNTU
407 EGLint EglImplementation::GetBufferAge(EGLSurface& eglSurface) const
410 eglQuerySurface(mEglDisplay, eglSurface, EGL_BUFFER_AGE_EXT, &age);
413 DALI_LOG_ERROR("eglQuerySurface(%d)\n", eglGetError());
417 // 0 - invalid buffer
421 DALI_LOG_ERROR("EglImplementation::GetBufferAge() buffer age %d > 3\n", age);
422 age = 0; // shoudn't be more than 3 back buffers, if there is just reset, I don't want to add extra history level
428 void EglImplementation::SetDamageRegion( EGLSurface& eglSurface, std::vector< Rect< int > >& damagedRects )
430 if( !mPartialUpdateRequired )
435 if( eglSurface != EGL_NO_SURFACE ) // skip if using surfaceless context
437 EGLBoolean result = mEglSetDamageRegionKHR( mEglDisplay, eglSurface, reinterpret_cast< int* >( damagedRects.data() ), 1 );
438 if (result == EGL_FALSE)
440 DALI_LOG_ERROR( "eglSetDamageRegionKHR(%d)\n", eglGetError() );
445 void EglImplementation::SwapBuffers(EGLSurface& eglSurface, const std::vector<Rect<int>>& damagedRects)
447 if (eglSurface != EGL_NO_SURFACE ) // skip if using surfaceless context
449 if (!mPartialUpdateRequired )
451 SwapBuffers(eglSurface);
455 #ifndef DALI_PROFILE_UBUNTU
456 if( mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT )
458 DALI_LOG_RELEASE_INFO( "EglImplementation::SwapBuffers started.\n" );
460 #endif //DALI_PROFILE_UBUNTU
462 EGLBoolean result = mEglSwapBuffersWithDamageKHR(mEglDisplay, eglSurface, reinterpret_cast<int*>(const_cast< std::vector< Rect< int > >& >( damagedRects ).data()), damagedRects.size());
463 if (result == EGL_FALSE)
465 DALI_LOG_ERROR("eglSwapBuffersWithDamageKHR(%d)\n", eglGetError());
468 #ifndef DALI_PROFILE_UBUNTU
469 if( mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT )
471 DALI_LOG_RELEASE_INFO( "EglImplementation::SwapBuffers finished.\n" );
472 mSwapBufferCountAfterResume++;
474 #endif //DALI_PROFILE_UBUNTU
478 void EglImplementation::CopyBuffers( EGLSurface& eglSurface )
480 eglCopyBuffers( mEglDisplay, eglSurface, mCurrentEglNativePixmap );
483 void EglImplementation::WaitGL()
488 bool EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
490 if(mEglConfig && isWindowType == mIsWindow && mColorDepth == depth)
496 mIsWindow = isWindowType;
499 Vector<EGLint> configAttribs;
500 configAttribs.Reserve(31);
504 configAttribs.PushBack( EGL_SURFACE_TYPE );
505 configAttribs.PushBack( EGL_WINDOW_BIT );
509 configAttribs.PushBack( EGL_SURFACE_TYPE );
510 configAttribs.PushBack( EGL_PIXMAP_BIT );
513 configAttribs.PushBack( EGL_RENDERABLE_TYPE );
515 if( mGlesVersion >= 30 )
517 configAttribs.PushBack( EGL_OPENGL_ES3_BIT_KHR );
521 configAttribs.PushBack( EGL_OPENGL_ES2_BIT );
524 // TODO: enable this flag when it becomes supported
525 // configAttribs.PushBack( EGL_CONTEXT_FLAGS_KHR );
526 // configAttribs.PushBack( EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR );
528 configAttribs.PushBack( EGL_RED_SIZE );
529 configAttribs.PushBack( 8 );
530 configAttribs.PushBack( EGL_GREEN_SIZE );
531 configAttribs.PushBack( 8 );
532 configAttribs.PushBack( EGL_BLUE_SIZE );
533 configAttribs.PushBack( 8 );
535 // For underlay video playback, we also need to set the alpha value of the 24/32bit window.
536 configAttribs.PushBack( EGL_ALPHA_SIZE );
537 configAttribs.PushBack( 8 );
539 configAttribs.PushBack( EGL_DEPTH_SIZE );
540 configAttribs.PushBack( mDepthBufferRequired ? 24 : 0 );
541 configAttribs.PushBack( EGL_STENCIL_SIZE );
542 configAttribs.PushBack( mStencilBufferRequired ? 8 : 0 );
544 #ifndef DALI_PROFILE_UBUNTU
545 if( mMultiSamplingLevel != EGL_DONT_CARE )
547 configAttribs.PushBack( EGL_SAMPLES );
548 configAttribs.PushBack( mMultiSamplingLevel );
549 configAttribs.PushBack( EGL_SAMPLE_BUFFERS );
550 configAttribs.PushBack( 1 );
552 #endif // DALI_PROFILE_UBUNTU
553 configAttribs.PushBack( EGL_NONE );
555 // Ensure number of configs is set to 1 as on some drivers,
556 // eglChooseConfig succeeds but does not actually create a proper configuration.
557 if ( ( eglChooseConfig( mEglDisplay, &(configAttribs[0]), &mEglConfig, 1, &numConfigs ) != EGL_TRUE ) ||
558 ( numConfigs != 1 ) )
560 if( mGlesVersion >= 30 )
563 DALI_LOG_ERROR("Fail to use OpenGL es 3.0. Retrying to use OpenGL es 2.0.");
567 if ( numConfigs != 1 )
569 DALI_LOG_ERROR("No configurations found.\n");
571 TEST_EGL_ERROR("eglChooseConfig");
574 EGLint error = eglGetError();
577 case EGL_BAD_DISPLAY:
579 DALI_LOG_ERROR("Display is not an EGL display connection\n");
582 case EGL_BAD_ATTRIBUTE:
584 DALI_LOG_ERROR("The parameter configAttribs contains an invalid frame buffer configuration attribute or an attribute value that is unrecognized or out of range\n");
587 case EGL_NOT_INITIALIZED:
589 DALI_LOG_ERROR("Display has not been initialized\n");
592 case EGL_BAD_PARAMETER:
594 DALI_LOG_ERROR("The parameter numConfig is NULL\n");
599 DALI_LOG_ERROR("Unknown error.\n");
602 DALI_ASSERT_ALWAYS(false && "eglChooseConfig failed!");
605 Integration::Log::LogMessage(Integration::Log::DebugInfo, "Using OpenGL es %d.%d.\n", mGlesVersion / 10, mGlesVersion % 10 );
607 mContextAttribs.Clear();
608 if( mIsKhrCreateContextSupported )
610 mContextAttribs.Reserve(5);
611 mContextAttribs.PushBack( EGL_CONTEXT_MAJOR_VERSION_KHR );
612 mContextAttribs.PushBack( mGlesVersion / 10 );
613 mContextAttribs.PushBack( EGL_CONTEXT_MINOR_VERSION_KHR );
614 mContextAttribs.PushBack( mGlesVersion % 10 );
618 mContextAttribs.Reserve(3);
619 mContextAttribs.PushBack( EGL_CONTEXT_CLIENT_VERSION );
620 mContextAttribs.PushBack( mGlesVersion / 10 );
622 mContextAttribs.PushBack( EGL_NONE );
627 EGLSurface EglImplementation::CreateSurfaceWindow( EGLNativeWindowType window, ColorDepth depth )
629 mEglNativeWindow = window;
634 ChooseConfig(mIsWindow, mColorDepth);
636 mCurrentEglSurface = eglCreateWindowSurface( mEglDisplay, mEglConfig, mEglNativeWindow, NULL );
637 TEST_EGL_ERROR("eglCreateWindowSurface");
639 DALI_ASSERT_ALWAYS( mCurrentEglSurface && "Create window surface failed" );
641 return mCurrentEglSurface;
644 EGLSurface EglImplementation::CreateSurfacePixmap( EGLNativePixmapType pixmap, ColorDepth depth )
646 mCurrentEglNativePixmap = pixmap;
651 ChooseConfig(mIsWindow, mColorDepth);
653 mCurrentEglSurface = eglCreatePixmapSurface( mEglDisplay, mEglConfig, mCurrentEglNativePixmap, NULL );
654 TEST_EGL_ERROR("eglCreatePixmapSurface");
656 DALI_ASSERT_ALWAYS( mCurrentEglSurface && "Create pixmap surface failed" );
658 return mCurrentEglSurface;
661 bool EglImplementation::ReplaceSurfaceWindow( EGLNativeWindowType window, EGLSurface& eglSurface, EGLContext& eglContext )
663 bool contextLost = false;
665 // display connection has not changed, then we can just create a new surface
666 // the surface is bound to the context, so set the context to null
671 // destroy the surface
672 DestroySurface( eglSurface );
675 // create the EGL surface
676 EGLSurface newEglSurface = CreateSurfaceWindow( window, mColorDepth );
678 // set the context to be current with the new surface
679 MakeContextCurrent( newEglSurface, eglContext );
684 bool EglImplementation::ReplaceSurfacePixmap( EGLNativePixmapType pixmap, EGLSurface& eglSurface )
686 bool contextLost = false;
688 // display connection has not changed, then we can just create a new surface
689 // create the EGL surface
690 eglSurface = CreateSurfacePixmap( pixmap, mColorDepth );
692 // set the eglSurface to be current
693 MakeCurrent( pixmap, eglSurface );
698 void EglImplementation::SetGlesVersion( const int32_t glesVersion )
700 mGlesVersion = glesVersion;
703 void EglImplementation::SetFirstFrameAfterResume()
705 mSwapBufferCountAfterResume = 0;
708 EGLDisplay EglImplementation::GetDisplay() const
713 EGLContext EglImplementation::GetContext() const
718 int32_t EglImplementation::GetGlesVersion() const
723 bool EglImplementation::IsSurfacelessContextSupported() const
725 return mIsSurfacelessContextSupported;
728 void EglImplementation::WaitClient()
730 // Wait for EGL to finish executing all rendering calls for the current context
731 if ( eglWaitClient() != EGL_TRUE )
733 TEST_EGL_ERROR("eglWaitClient");
737 bool EglImplementation::IsPartialUpdateRequired() const
739 return mPartialUpdateRequired;
742 } // namespace Adaptor
744 } // namespace Internal
748 #pragma GCC diagnostic pop