blob: 3b33f5dccdb8b4426d7e51b5556333a547641203 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "display_skia_output_device.h"
#include "display_software_output_surface.h"
#include "components/viz/service/display_embedder/output_surface_provider_impl.h"
#include "components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h"
#include "gpu/ipc/in_process_command_buffer.h"
#include <qtgui-config.h>
std::unique_ptr<viz::OutputSurface>
viz::OutputSurfaceProviderImpl::CreateSoftwareOutputSurface(const RendererSettings &renderer_settings)
{
return std::make_unique<QtWebEngineCore::DisplaySoftwareOutputSurface>(renderer_settings.requires_alpha_channel);
}
std::unique_ptr<viz::SkiaOutputDevice>
viz::SkiaOutputSurfaceImplOnGpu::CreateOutputDevice()
{
#if QT_CONFIG(opengl)
return std::make_unique<QtWebEngineCore::DisplaySkiaOutputDevice>(
context_state_,
renderer_settings_.requires_alpha_channel,
shared_gpu_deps_->memory_tracker(),
GetDidSwapBuffersCompleteCallback());
#else
return nullptr;
#endif // QT_CONFIG(opengl)
}
|