Commit 959e197c by Corentin Wallez

Implement missing util/ functions on Mac

SetLowPriorityProcess's implementation can be shared between Mac and Linux so even though it isn't using a Posix API, it lives in the posix file. CreateOSPixmap needed to be implemented but will never be used by dEQP as our Mac EGL backend doesn't expose configs supporting pixmaps. BUG=angleproject:891 Change-Id: I7b53b44b3465045954ec8e5997f703525ece92d0 Reviewed-on: https://chromium-review.googlesource.com/299851Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent a0928b94
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#ifndef SAMPLE_UTIL_PIXMAP_H_ #ifndef SAMPLE_UTIL_PIXMAP_H_
#define SAMPLE_UTIL_PIXMAP_H_ #define SAMPLE_UTIL_PIXMAP_H_
#include <stdlib.h>
#include <EGL/egl.h> #include <EGL/egl.h>
#include <EGL/eglext.h> #include <EGL/eglext.h>
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "system_utils.h" #include "system_utils.h"
#include <sys/resource.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/types.h> #include <sys/types.h>
......
//
// Copyright (c) 2015 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// OSXPixmap.h: Definition of the implementation of OSPixmap for OSX
#ifndef UTIL_OSX_PIXMAP_H_
#define UTIL_OSX_PIXMAP_H_
#include "OSPixmap.h"
#endif // UTIL_OSX_PIXMAP_H_
//
// Copyright (c) 2015 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// OSXPixmap.cpp: Implementation of OSPixmap for OSX
#include "osx/OSXPixmap.h"
// TODO(cwallez) find out the native OSX pixmap type and implement this
OSPixmap *CreateOSPixmap()
{
return nullptr;
}
...@@ -8,8 +8,10 @@ ...@@ -8,8 +8,10 @@
#include "system_utils.h" #include "system_utils.h"
#include <sys/resource.h>
#include <sched.h> #include <sched.h>
#include <time.h> #include <time.h>
#include <unistd.h>
namespace angle namespace angle
{ {
...@@ -34,4 +36,9 @@ void Sleep(unsigned int milliseconds) ...@@ -34,4 +36,9 @@ void Sleep(unsigned int milliseconds)
} }
} }
void SetLowPriorityProcess()
{
setpriority(PRIO_PROCESS, getpid(), 10);
}
} // namespace angle } // namespace angle
...@@ -54,6 +54,8 @@ ...@@ -54,6 +54,8 @@
'osx/OSX_system_utils.cpp', 'osx/OSX_system_utils.cpp',
'osx/OSXTimer.cpp', 'osx/OSXTimer.cpp',
'osx/OSXTimer.h', 'osx/OSXTimer.h',
'osx/OSXPixmap.mm',
'osx/OSXPixmap.h',
'osx/OSXWindow.mm', 'osx/OSXWindow.mm',
'osx/OSXWindow.h', 'osx/OSXWindow.h',
'posix/Posix_system_utils.cpp', 'posix/Posix_system_utils.cpp',
......
...@@ -29,4 +29,4 @@ class X11Pixmap : public OSPixmap ...@@ -29,4 +29,4 @@ class X11Pixmap : public OSPixmap
Display *mDisplay; Display *mDisplay;
}; };
#endif // UTIL_WIN32_PIXMAP_H_ #endif // UTIL_X11_PIXMAP_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment