2 * Copyright (c) 2017 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.
18 #include <dali/graphics/vulkan/vulkan-types.h>
19 #include <dali/graphics/vulkan/vulkan-graphics.h>
20 #include <dali/graphics/vulkan/vulkan-surface.h>
22 #include <dali/integration-api/graphics/graphics.h>
26 /// fixme: substituting directly the vulkan implementation
29 using GraphicsImpl = Dali::Graphics::Vulkan::Graphics;
40 auto impl = Dali::Graphics::MakeUnique<Dali::Graphics::GraphicsImpl>();
44 mGraphicsImpl = std::move(impl);
52 Dali::Graphics::FBID Graphics::Create(
53 std::unique_ptr<Dali::Integration::Graphics::SurfaceFactory> surfaceFactory)
57 auto retval = mGraphicsImpl->CreateSurface(std::move(surfaceFactory));
60 mGraphicsImpl->CreateDevice();
65 Dali::Graphics::FBID Graphics::CreateSurface(
66 std::unique_ptr<Dali::Integration::Graphics::SurfaceFactory> surfaceFactory)
71 void Graphics::PreRender(Dali::Graphics::FBID framebufferId)
73 assert(framebufferId != 0u && "Invalid FBID!");
74 auto &surface = mGraphicsImpl->GetSurface(framebufferId);
75 surface.AcquireNextImage();
81 void Graphics::PostRender(Dali::Graphics::FBID framebufferId)
83 assert(framebufferId != 0u && "Invalid FBID!");
84 auto &surface = mGraphicsImpl->GetSurface(framebufferId);
88 void IncludeThisLibrary()
90 // dummy function to create linker dependency
93 } // Namespace Graphics
94 } // Namespace Integration