mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 08:46:09 +00:00
Update laf module with initial GPU support (#960)
Anyway this is incomplete and Aseprite is not yet ready to support GPU acceleration (as the rendering phase is CPU intensive).
This commit is contained in:
parent
e823ee37e9
commit
0a3644dfbb
2
laf
2
laf
@ -1 +1 @@
|
||||
Subproject commit e600f3be164c6975ed048f7043b779b11c6aa876
|
||||
Subproject commit af7c239ac6629f7bd102b3e648c0dd86c2054407
|
@ -434,11 +434,14 @@ public:
|
||||
|
||||
selectScalingItems();
|
||||
|
||||
if ((int(os::instance()->capabilities()) &
|
||||
int(os::Capabilities::GpuAccelerationSwitch)) == int(os::Capabilities::GpuAccelerationSwitch)) {
|
||||
#ifdef _DEBUG // TODO enable this on Release when Aseprite supports
|
||||
// GPU-acceleration properly
|
||||
if (os::instance()->hasCapability(os::Capabilities::GpuAccelerationSwitch)) {
|
||||
gpuAcceleration()->setSelected(m_pref.general.gpuAcceleration());
|
||||
}
|
||||
else {
|
||||
else
|
||||
#endif
|
||||
{
|
||||
gpuAcceleration()->setVisible(false);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018-2021 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -181,8 +181,7 @@ int init_module_gui()
|
||||
// If we've created the display with hardware acceleration,
|
||||
// now we try to do it without hardware acceleration.
|
||||
if (gpuAccel &&
|
||||
(int(os::instance()->capabilities()) &
|
||||
int(os::Capabilities::GpuAccelerationSwitch)) == int(os::Capabilities::GpuAccelerationSwitch)) {
|
||||
os::instance()->hasCapability(os::Capabilities::GpuAccelerationSwitch)) {
|
||||
if (create_main_window(false, maximized, lastError)) {
|
||||
// Disable hardware acceleration
|
||||
pref.general.gpuAcceleration(false);
|
||||
|
@ -275,6 +275,8 @@ void Manager::flipDisplay()
|
||||
|
||||
m_dirtyRegion.clear();
|
||||
}
|
||||
|
||||
m_display->swapBuffers();
|
||||
}
|
||||
|
||||
void Manager::updateAllDisplaysWithNewScale(int scale)
|
||||
|
Loading…
Reference in New Issue
Block a user