app_server: Update overlay hooks after mode change.
* They are supposed to be depending on the current mode. * This should help with #12613.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2014 Haiku, Inc. All rights reserved.
|
* Copyright 2001-2016 Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -133,6 +133,17 @@ AccelerantHWInterface::AccelerantHWInterface()
|
|||||||
fAccDPMSMode(NULL),
|
fAccDPMSMode(NULL),
|
||||||
fAccSetDPMSMode(NULL),
|
fAccSetDPMSMode(NULL),
|
||||||
|
|
||||||
|
// overlay hooks
|
||||||
|
fAccOverlayCount(NULL),
|
||||||
|
fAccOverlaySupportedSpaces(NULL),
|
||||||
|
fAccOverlaySupportedFeatures(NULL),
|
||||||
|
fAccAllocateOverlayBuffer(NULL),
|
||||||
|
fAccReleaseOverlayBuffer(NULL),
|
||||||
|
fAccGetOverlayConstraints(NULL),
|
||||||
|
fAccAllocateOverlay(NULL),
|
||||||
|
fAccReleaseOverlay(NULL),
|
||||||
|
fAccConfigureOverlay(NULL),
|
||||||
|
|
||||||
fModeCount(0),
|
fModeCount(0),
|
||||||
fModeList(NULL),
|
fModeList(NULL),
|
||||||
|
|
||||||
@@ -390,6 +401,27 @@ AccelerantHWInterface::_SetupDefaultHooks()
|
|||||||
fAccDPMSMode = (dpms_mode)fAccelerantHook(B_DPMS_MODE, NULL);
|
fAccDPMSMode = (dpms_mode)fAccelerantHook(B_DPMS_MODE, NULL);
|
||||||
fAccSetDPMSMode = (set_dpms_mode)fAccelerantHook(B_SET_DPMS_MODE, NULL);
|
fAccSetDPMSMode = (set_dpms_mode)fAccelerantHook(B_SET_DPMS_MODE, NULL);
|
||||||
|
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
AccelerantHWInterface::_UpdateHooksAfterModeChange()
|
||||||
|
{
|
||||||
|
// update acceleration hooks
|
||||||
|
#if USE_ACCELERATION
|
||||||
|
fAccFillRect = (fill_rectangle)fAccelerantHook(B_FILL_RECTANGLE,
|
||||||
|
(void *)&fDisplayMode);
|
||||||
|
fAccInvertRect = (invert_rectangle)fAccelerantHook(B_INVERT_RECTANGLE,
|
||||||
|
(void *)&fDisplayMode);
|
||||||
|
fAccScreenBlit = (screen_to_screen_blit)fAccelerantHook(
|
||||||
|
B_SCREEN_TO_SCREEN_BLIT, (void *)&fDisplayMode);
|
||||||
|
#else
|
||||||
|
fAccFillRect = NULL;
|
||||||
|
fAccInvertRect = NULL;
|
||||||
|
fAccScreenBlit = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
// overlay
|
// overlay
|
||||||
fAccOverlayCount = (overlay_count)fAccelerantHook(B_OVERLAY_COUNT, NULL);
|
fAccOverlayCount = (overlay_count)fAccelerantHook(B_OVERLAY_COUNT, NULL);
|
||||||
fAccOverlaySupportedSpaces = (overlay_supported_spaces)fAccelerantHook(
|
fAccOverlaySupportedSpaces = (overlay_supported_spaces)fAccelerantHook(
|
||||||
@@ -408,8 +440,6 @@ AccelerantHWInterface::_SetupDefaultHooks()
|
|||||||
= (release_overlay)fAccelerantHook(B_RELEASE_OVERLAY, NULL);
|
= (release_overlay)fAccelerantHook(B_RELEASE_OVERLAY, NULL);
|
||||||
fAccConfigureOverlay
|
fAccConfigureOverlay
|
||||||
= (configure_overlay)fAccelerantHook(B_CONFIGURE_OVERLAY, NULL);
|
= (configure_overlay)fAccelerantHook(B_CONFIGURE_OVERLAY, NULL);
|
||||||
|
|
||||||
return B_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -637,19 +667,7 @@ AccelerantHWInterface::SetMode(const display_mode& mode)
|
|||||||
depth, fFrameBufferConfig.bytes_per_row);
|
depth, fFrameBufferConfig.bytes_per_row);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// update acceleration hooks
|
_UpdateHooksAfterModeChange();
|
||||||
#if USE_ACCELERATION
|
|
||||||
fAccFillRect = (fill_rectangle)fAccelerantHook(B_FILL_RECTANGLE,
|
|
||||||
(void *)&fDisplayMode);
|
|
||||||
fAccInvertRect = (invert_rectangle)fAccelerantHook(B_INVERT_RECTANGLE,
|
|
||||||
(void *)&fDisplayMode);
|
|
||||||
fAccScreenBlit = (screen_to_screen_blit)fAccelerantHook(
|
|
||||||
B_SCREEN_TO_SCREEN_BLIT, (void *)&fDisplayMode);
|
|
||||||
#else
|
|
||||||
fAccFillRect = NULL;
|
|
||||||
fAccInvertRect = NULL;
|
|
||||||
fAccScreenBlit = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// in case there is no accelerated blit function, using
|
// in case there is no accelerated blit function, using
|
||||||
// an offscreen located backbuffer will not be beneficial!
|
// an offscreen located backbuffer will not be beneficial!
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2005-2012, Haiku.
|
* Copyright 2005-2016, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Michael Lotz <mmlr@mlotz.ch>
|
|
||||||
* Stephan Aßmus <superstippi@gmx.de>
|
* Stephan Aßmus <superstippi@gmx.de>
|
||||||
|
* Axel Dörfler, axeld@pinc-software.de
|
||||||
|
* Michael Lotz <mmlr@mlotz.ch>
|
||||||
*/
|
*/
|
||||||
#ifndef ACCELERANT_HW_INTERFACE_H
|
#ifndef ACCELERANT_HW_INTERFACE_H
|
||||||
#define ACCELERANT_HW_INTERFACE_H
|
#define ACCELERANT_HW_INTERFACE_H
|
||||||
@@ -104,6 +105,7 @@ private:
|
|||||||
int _OpenGraphicsDevice(int deviceNumber);
|
int _OpenGraphicsDevice(int deviceNumber);
|
||||||
status_t _OpenAccelerant(int device);
|
status_t _OpenAccelerant(int device);
|
||||||
status_t _SetupDefaultHooks();
|
status_t _SetupDefaultHooks();
|
||||||
|
void _UpdateHooksAfterModeChange();
|
||||||
status_t _UpdateModeList();
|
status_t _UpdateModeList();
|
||||||
status_t _UpdateFrameBufferConfig();
|
status_t _UpdateFrameBufferConfig();
|
||||||
void _RegionToRectParams(/*const*/ BRegion* region,
|
void _RegionToRectParams(/*const*/ BRegion* region,
|
||||||
|
|||||||
Reference in New Issue
Block a user