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.
19 #include <dali/internal/graphics/gles/egl-context-helper-implementation.h>
23 #include <dali/integration-api/debug.h>
26 #include <dali/internal/graphics/gles/egl-implementation.h>
35 EglContextHelperImplementation::EglContextHelperImplementation()
36 : mEglImplementation( NULL )
40 void EglContextHelperImplementation::Initialize( EglImplementation* eglImpl )
42 mEglImplementation = eglImpl;
45 void EglContextHelperImplementation::MakeSurfacelessContextCurrent()
47 if ( mEglImplementation && mEglImplementation->IsSurfacelessContextSupported() )
49 mEglImplementation->MakeContextCurrent( EGL_NO_SURFACE, mEglImplementation->GetContext() );
53 void EglContextHelperImplementation::MakeContextNull()
55 if ( mEglImplementation )
57 mEglImplementation->MakeContextNull();
61 void EglContextHelperImplementation::WaitClient()
63 if ( mEglImplementation )
65 mEglImplementation->WaitClient();
70 } // namespace Internal
71 } // namespace Adaptor