skia: Add ANGLE support on Mac

I want to be able to compare ANGLE vs CommandBuffer for
dm and nanobench on Mac, so enabling ANGLE on mac.

Review URL: https://codereview.chromium.org/1395783003
This commit is contained in:
hendrikw 2015-10-28 08:42:29 -07:00 committed by Commit bot
parent 100b8f8c07
commit 9a7404188e
4 changed files with 11 additions and 2 deletions

View File

@ -30,8 +30,8 @@
[ 'skia_mesa and skia_os not in ["mac", "linux"]', {
'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)',
}],
[ 'skia_angle and not (skia_os == "win" or skia_os == "linux")', {
'error': '<!(skia_angle=1 only supported with skia_os="win" or skia_os="linux".)',
[ 'skia_angle and not (skia_os == "win" or skia_os == "linux" or skia_os == "mac")', {
'error': '<!(skia_angle=1 only supported with skia_os="win" or skia_os="linux" or skia_os="mac".)',
}],
[ 'skia_os == "chromeos" and OS != "linux"', {
'error': '<!(Skia ChromeOS build is only supported on Linux.)',

View File

@ -464,6 +464,10 @@
[ 'skia_os == "mac"',
{
'defines': [ 'SK_BUILD_FOR_MAC' ],
'conditions': [
# ANGLE for mac hits -Wunneeded-internal-declaration if this isn't set.
[ 'skia_angle', { 'defines': [ 'YY_NO_INPUT' ], } ],
],
'configurations': {
'Coverage': {
'xcode_settings': {

View File

@ -24,6 +24,9 @@ public:
#if SK_SUPPORT_GPU
kNativeGL_BackEndType,
#endif
#if SK_ANGLE
kANGLE_BackEndType,
#endif // SK_ANGLE
#if SK_COMMAND_BUFFER
kCommandBuffer_BackEndType,
#endif // SK_COMMAND_BUFFER

View File

@ -27,6 +27,8 @@ const GrGLInterface* GrGLCreateANGLEInterface() {
// We load the ANGLE library and never let it go
#if defined _WIN32
gANGLELib = DynamicLoadLibrary("libGLESv2.dll");
#elif defined SK_BUILD_FOR_MAC
gANGLELib = DynamicLoadLibrary("libGLESv2.dylib");
#else
gANGLELib = DynamicLoadLibrary("libGLESv2.so");
#endif // defined _WIN32