diff options
Diffstat (limited to 'gyp')
-rw-r--r-- | gyp/bench.gypi | 13 | ||||
-rw-r--r-- | gyp/common.gypi | 12 | ||||
-rw-r--r-- | gyp/common_variables.gypi | 2 | ||||
-rw-r--r-- | gyp/gpu.gyp | 68 |
4 files changed, 66 insertions, 29 deletions
diff --git a/gyp/bench.gypi b/gyp/bench.gypi index 3b79380eec..127c62a56c 100644 --- a/gyp/bench.gypi +++ b/gyp/bench.gypi @@ -13,8 +13,6 @@ '../bench/BenchSysTimer_windows.cpp', '../bench/BenchGpuTimer_gl.h', '../bench/BenchGpuTimer_gl.cpp', - '../bench/BenchGpuTimer_none.h', - '../bench/BenchGpuTimer_none.cpp', '../bench/SkBenchmark.h', '../bench/SkBenchmark.cpp', @@ -56,17 +54,6 @@ '../bench/BenchSysTimer_windows.cpp', ], }], - [ 'skia_os in ["win", "mac", "linux", "freebsd", "openbsd", "solaris"]', { - 'sources!': [ - '../bench/BenchGpuTimer_none.h', - '../bench/BenchGpuTimer_none.cpp', - ], - },{ - 'sources!': [ - '../bench/BenchGpuTimer_gl.h', - '../bench/BenchGpuTimer_gl.cpp', - ], - }], ], } diff --git a/gyp/common.gypi b/gyp/common.gypi index 51d68e8778..30424de9fd 100644 --- a/gyp/common.gypi +++ b/gyp/common.gypi @@ -15,6 +15,8 @@ 'conditions': [ ['skia_os != OS and not (skia_os == "ios" and OS == "mac")', {'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))'}], + ['skia_mesa and skia_os not in ["mac", "linux"]', + {'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)'}], ], }, 'includes': [ @@ -34,6 +36,16 @@ ], } ], + [ 'skia_mesa', { + 'defines': [ + 'SK_MESA', + ], + 'direct_dependent_settings': { + 'defines': [ + 'SK_MESA', + ], + }, + }], ], 'configurations': { 'Debug': { diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi index 5c27cc37c1..42e7c22f1f 100644 --- a/gyp/common_variables.gypi +++ b/gyp/common_variables.gypi @@ -9,9 +9,11 @@ 'variables': { 'skia_scalar%': 'float', 'skia_os%': '<(OS)', + 'skia_mesa%': 0, }, 'skia_scalar%': '<(skia_scalar)', 'skia_os': '<(skia_os)', + 'skia_mesa': '<(skia_mesa)', } # Local Variables: diff --git a/gyp/gpu.gyp b/gyp/gpu.gyp index 690258a1a9..132b8e96ab 100644 --- a/gyp/gpu.gyp +++ b/gyp/gpu.gyp @@ -96,29 +96,41 @@ '../include/gpu', ], 'sources': [ + '../include/gpu/SkGLContext.h', + '../include/gpu/SkMesaGLContext.h', + '../include/gpu/SkNativeGLContext.h', '../include/gpu/SkGpuCanvas.h', '../include/gpu/SkGpuDevice.h', '../include/gpu/SkGr.h', '../include/gpu/SkGrTexturePixelRef.h', '../src/gpu/GrPrintf_skia.cpp', + '../src/gpu/SkGLContext.cpp', '../src/gpu/SkGpuCanvas.cpp', '../src/gpu/SkGpuDevice.cpp', '../src/gpu/SkGr.cpp', '../src/gpu/SkGrFontScaler.cpp', '../src/gpu/SkGrTexturePixelRef.cpp', - '../src/gpu/mac/SkGLContext_mac.cpp', + '../src/gpu/mac/SkNativeGLContext_mac.cpp', - '../src/gpu/win/SkGLContext_win.cpp', + '../src/gpu/win/SkNativeGLContext_win.cpp', - '../src/gpu/unix/SkGLContext_unix.cpp', + '../src/gpu/unix/SkNativeGLContext_unix.cpp', - '../src/gpu/mesa/SkGLContext_mesa.cpp', + '../src/gpu/mesa/SkMesaGLContext.cpp', ], - # Removed for now - 'sources!': [ - '../src/gpu/mesa/SkGLContext_mesa.cpp', + 'conditions': [ + [ 'not skia_mesa', { + 'sources!': [ + '../src/gpu/mesa/SkMesaGLContext.cpp', + ], + }], + [ 'skia_mesa and skia_os == "mac"', { + 'include_dirs': [ + '$(SDKROOT)/usr/X11/include/', + ], + }], ], }, { @@ -194,7 +206,9 @@ '../src/gpu/GrDrawTarget.cpp', '../src/gpu/GrDrawTarget.h', '../src/gpu/GrGeometryBuffer.h', + '../src/gpu/GrGLCreateNativeInterface_none.cpp', '../src/gpu/GrGLDefaultInterface_none.cpp', + '../src/gpu/GrGLDefaultInterface_native.cpp', '../src/gpu/GrGLIndexBuffer.cpp', '../src/gpu/GrGLIndexBuffer.h', '../src/gpu/GrGLInterface.cpp', @@ -249,17 +263,14 @@ '../src/gpu/GrVertexBuffer.h', '../src/gpu/gr_unittests.cpp', - '../src/gpu/mac/GrGLDefaultInterface_mac.cpp', - '../src/gpu/win/GrGLDefaultInterface_win.cpp', + '../src/gpu/mac/GrGLCreateNativeInterface_mac.cpp', - '../src/gpu/unix/GrGLDefaultInterface_unix.cpp', + '../src/gpu/win/GrGLCreateNativeInterface_win.cpp', - '../src/gpu/mesa/GrGLDefaultInterface_mesa.cpp', - ], - # Removed for now - 'sources!': [ - '../src/gpu/mesa/GrGLDefaultInterface_mesa.cpp', + '../src/gpu/unix/GrGLCreateNativeInterface_unix.cpp', + + '../src/gpu/mesa/GrGLCreateMesaInterface.cpp', ], 'defines': [ 'GR_IMPLEMENTATION=1', @@ -268,6 +279,7 @@ [ 'skia_os == "linux"', { 'sources!': [ '../src/gpu/GrGLDefaultInterface_none.cpp', + '../src/gpu/GrGLCreateNativeInterface_none.cpp', ], 'link_settings': { 'libraries': [ @@ -276,6 +288,13 @@ ], }, }], + [ 'skia_mesa and skia_os == "linux"', { + 'link_settings': { + 'libraries': [ + '-lOSMesa', + ], + }, + }], [ 'skia_os == "mac"', { 'link_settings': { 'libraries': [ @@ -284,11 +303,28 @@ }, 'sources!': [ '../src/gpu/GrGLDefaultInterface_none.cpp', + '../src/gpu/GrGLCreateNativeInterface_none.cpp', ], - }], + }], + [ 'skia_mesa and skia_os == "mac"', { + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/usr/X11/lib/libOSMesa.dylib', + ], + }, + 'include_dirs': [ + '$(SDKROOT)/usr/X11/include/', + ], + }], + [ 'not skia_mesa', { + 'sources!': [ + '../src/gpu/mesa/GrGLCreateMesaInterface.cpp', + ], + }], [ 'skia_os == "win"', { 'sources!': [ '../src/gpu/GrGLDefaultInterface_none.cpp', + '../src/gpu/GrGLCreateNativeInterface_none.cpp', ], }], ], |