* This should fix the app_server build under other architectures than x86.
* Fixed wrong operator precedence case in Painter::SetFont(). * Fixed dozens of style violations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31177 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2007, Haiku, Inc.
|
* Copyright (c) 2001-2009, Haiku, Inc.
|
||||||
* Distributed under the terms of the MIT license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -39,11 +39,13 @@ BTokenSpace gTokenSpace;
|
|||||||
uint32 gAppServerSIMDFlags = 0;
|
uint32 gAppServerSIMDFlags = 0;
|
||||||
|
|
||||||
|
|
||||||
/*! Detect SIMD flags for use in AppServer. Checks all CPUs in the system
|
/*! Detect SIMD flags for use in AppServer. Checks all CPUs in the system
|
||||||
and chooses the minimum supported set of instructions. */
|
and chooses the minimum supported set of instructions.
|
||||||
|
*/
|
||||||
static void
|
static void
|
||||||
detect_simd()
|
detect_simd()
|
||||||
{
|
{
|
||||||
|
#if __INTEL__
|
||||||
// Only scan CPUs for which we are certain the SIMD flags are properly
|
// Only scan CPUs for which we are certain the SIMD flags are properly
|
||||||
// defined.
|
// defined.
|
||||||
char* vendorNames[] = {
|
char* vendorNames[] = {
|
||||||
@@ -56,15 +58,15 @@ detect_simd()
|
|||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
system_info sysInfo;
|
system_info systemInfo;
|
||||||
if (get_system_info(&sysInfo) != B_OK || sysInfo.cpu_count < 1)
|
if (get_system_info(&systemInfo) != B_OK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// We start out with all flags set and end up with only those flags
|
// We start out with all flags set and end up with only those flags
|
||||||
// supported across all CPUs found.
|
// supported across all CPUs found.
|
||||||
uint32 appServerSIMD = 0xffffffff;
|
uint32 appServerSIMD = 0xffffffff;
|
||||||
|
|
||||||
for (int32 cpu = 0; cpu < sysInfo.cpu_count; cpu++) {
|
for (int32 cpu = 0; cpu < systemInfo.cpu_count; cpu++) {
|
||||||
cpuid_info cpuInfo;
|
cpuid_info cpuInfo;
|
||||||
get_cpuid(&cpuInfo, 0, cpu);
|
get_cpuid(&cpuInfo, 0, cpu);
|
||||||
|
|
||||||
@@ -95,9 +97,13 @@ detect_simd()
|
|||||||
appServerSIMD &= cpuSIMD;
|
appServerSIMD &= cpuSIMD;
|
||||||
}
|
}
|
||||||
gAppServerSIMDFlags = appServerSIMD;
|
gAppServerSIMDFlags = appServerSIMD;
|
||||||
|
#endif // __INTEL__
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Constructor
|
\brief Constructor
|
||||||
|
|
||||||
@@ -138,13 +144,10 @@ AppServer::AppServer()
|
|||||||
|
|
||||||
// Initialize SIMD flags
|
// Initialize SIMD flags
|
||||||
detect_simd();
|
detect_simd();
|
||||||
#if 0
|
|
||||||
_LaunchCursorThread();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief Destructor
|
/*! \brief Destructor
|
||||||
Reached only when the server is asked to shut down in Test mode.
|
Reached only when the server is asked to shut down in Test mode.
|
||||||
*/
|
*/
|
||||||
AppServer::~AppServer()
|
AppServer::~AppServer()
|
||||||
@@ -161,9 +164,6 @@ AppServer::~AppServer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief The call that starts it all...
|
|
||||||
*/
|
|
||||||
void
|
void
|
||||||
AppServer::RunLooper()
|
AppServer::RunLooper()
|
||||||
{
|
{
|
||||||
@@ -172,8 +172,7 @@ AppServer::RunLooper()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*! \brief Creates a desktop object for an authorized user
|
||||||
\brief Creates a desktop object for an authorized user
|
|
||||||
*/
|
*/
|
||||||
Desktop *
|
Desktop *
|
||||||
AppServer::_CreateDesktop(uid_t userID)
|
AppServer::_CreateDesktop(uid_t userID)
|
||||||
@@ -205,8 +204,7 @@ AppServer::_CreateDesktop(uid_t userID)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*! \brief Finds the desktop object that belongs to a certain user
|
||||||
\brief Finds the desktop object that belongs to a certain user
|
|
||||||
*/
|
*/
|
||||||
Desktop *
|
Desktop *
|
||||||
AppServer::_FindDesktop(uid_t userID)
|
AppServer::_FindDesktop(uid_t userID)
|
||||||
@@ -224,8 +222,7 @@ AppServer::_FindDesktop(uid_t userID)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*! \brief Message handling function for all messages sent to the app_server
|
||||||
\brief Message handling function for all messages sent to the app_server
|
|
||||||
\param code ID of the message sent
|
\param code ID of the message sent
|
||||||
\param buffer Attachment buffer for the message.
|
\param buffer Attachment buffer for the message.
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ UseFreeTypeHeaders ;
|
|||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) drawing_modes ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) drawing_modes ] ;
|
||||||
|
|
||||||
|
local PAINTER_ARCH_SOURCES ;
|
||||||
|
if $(TARGET_ARCH) = x86 {
|
||||||
|
PAINTER_ARCH_SOURCES = painter_bilinear_scale.nasm ;
|
||||||
|
}
|
||||||
|
|
||||||
StaticLibrary libpainter.a :
|
StaticLibrary libpainter.a :
|
||||||
GlobalSubpixelSettings.cpp
|
GlobalSubpixelSettings.cpp
|
||||||
Painter.cpp
|
Painter.cpp
|
||||||
@@ -22,5 +27,5 @@ StaticLibrary libpainter.a :
|
|||||||
|
|
||||||
AGGTextRenderer.cpp
|
AGGTextRenderer.cpp
|
||||||
|
|
||||||
painter_bilinear_scale.nasm
|
$(PAINTER_ARCH_SOURCES)
|
||||||
;
|
;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user