2 * Copyright (c) 2015 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/window-system/common/display-connection.h>
20 #include <dali/internal/window-system/common/display-connection-factory.h>
24 #include <dali/internal/window-system/common/display-connection-impl.h>
25 #include <dali/internal/window-system/common/display-connection-factory.h>
26 #include <dali/integration-api/egl-interface.h>
31 DisplayConnection* DisplayConnection::New()
33 auto factory = Dali::Internal::Adaptor::GetDisplayConnectionFactory();
34 auto displayConnection = factory->CreateDisplayConnection();
36 Internal::Adaptor::DisplayConnection* internal( displayConnection.release() );
38 return new DisplayConnection(internal);
41 DisplayConnection* DisplayConnection::New( RenderSurface::Type type )
43 auto factory = Dali::Internal::Adaptor::GetDisplayConnectionFactory();
44 auto displayConnection = factory->CreateDisplayConnection();
46 Internal::Adaptor::DisplayConnection* internal( displayConnection.release() );
48 internal->SetSurfaceType( type );
50 return new DisplayConnection(internal);
53 DisplayConnection::DisplayConnection() = default;
55 DisplayConnection::~DisplayConnection() = default;
57 DisplayConnection::DisplayConnection(Internal::Adaptor::DisplayConnection* impl)
62 Any DisplayConnection::GetDisplay()
64 return mImpl->GetDisplay();
67 void DisplayConnection::ConsumeEvents()
69 mImpl->ConsumeEvents();
72 bool DisplayConnection::InitializeEgl(EglInterface& egl)
74 return mImpl->InitializeEgl(egl);