diff --git a/build/all.gyp b/build/all.gyp index 5e31b7b827274b..6f17763cb259d8 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -146,7 +146,7 @@ '../courgette/courgette.gyp:*', '../rlz/rlz.gyp:*', '../sandbox/sandbox.gyp:*', - '../third_party/angle/src/build_angle.gyp:*', + '<(angle_path)/src/build_angle.gyp:*', '../third_party/bsdiff/bsdiff.gyp:*', '../third_party/bspatch/bspatch.gyp:*', '../third_party/gles2_book/gles2_book.gyp:*', diff --git a/build/common.gypi b/build/common.gypi index e34b1590dd6a73..729e9d927a97f3 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1700,6 +1700,12 @@ }], ], + + # The path to the ANGLE library. TODO(apatrick): This is to help + # transition to a new version of ANGLE at a new location. After the + # transition is complete, this can be removed. + 'angle_path': '<(DEPTH)/third_party/angle', + # List of default apps to install in new profiles. The first list contains # the source files as found in svn. The second list, used only for linux, # contains the destination location for each of the files. When a crx @@ -1811,6 +1817,11 @@ }], ], }, + 'defines': [ + # Set this to use the new DX11 version of ANGLE. + # TODO(apatrick): Remove this when the transition is complete. + #'ANGLE_DX11', + ], 'conditions': [ ['(OS=="mac" or OS=="ios") and asan==1', { 'dependencies': [ diff --git a/content/DEPS b/content/DEPS index 91a249a6514c3f..e5a20226c99502 100644 --- a/content/DEPS +++ b/content/DEPS @@ -52,6 +52,7 @@ include_rules = [ # Allow inclusion of third-party code: "+third_party/angle", + "+third_party/angle_dx11", "+third_party/flac", "+third_party/gpsd", "+third_party/libjingle", diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc index 4c1d355b7b7800..9785248729e638 100644 --- a/content/browser/gpu/gpu_internals_ui.cc +++ b/content/browser/gpu/gpu_internals_ui.cc @@ -29,7 +29,13 @@ #include "gpu/config/gpu_feature_type.h" #include "gpu/config/gpu_info.h" #include "grit/content_resources.h" + + +#if defined(ANGLE_DX11) +#include "third_party/angle_dx11/src/common/version.h" +#else #include "third_party/angle/src/common/version.h" +#endif namespace content { namespace { diff --git a/content/content_gpu.gypi b/content/content_gpu.gypi index 86529d75bee500..84f42aa8d57c81 100644 --- a/content/content_gpu.gypi +++ b/content/content_gpu.gypi @@ -24,12 +24,12 @@ ['OS=="win"', { 'include_dirs': [ '<(DEPTH)/third_party/khronos', - '<(DEPTH)/third_party/angle/src', + '<(angle_path)/src', '<(DEPTH)/third_party/wtl/include', ], 'dependencies': [ - '../third_party/angle/src/build_angle.gyp:libEGL', - '../third_party/angle/src/build_angle.gyp:libGLESv2', + '<(angle_path)/src/build_angle.gyp:libEGL', + '<(angle_path)/src/build_angle.gyp:libGLESv2', ], 'link_settings': { 'libraries': [ diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 03ee4a7031efd7..2fe5d1fb00dad4 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -1057,8 +1057,8 @@ }], ['OS=="win"', { 'dependencies': [ - '../third_party/angle/src/build_angle.gyp:libEGL', - '../third_party/angle/src/build_angle.gyp:libGLESv2', + '<(angle_path)/src/build_angle.gyp:libEGL', + '<(angle_path)/src/build_angle.gyp:libGLESv2', ], }], ['(OS=="win" and win_use_allocator_shim==1) or ' diff --git a/gpu/DEPS b/gpu/DEPS index 074d493f697729..dd12d8db550bcf 100644 --- a/gpu/DEPS +++ b/gpu/DEPS @@ -1,6 +1,7 @@ include_rules = [ "+native_client/src/include", "+third_party/angle", + "+third_party/angle_dx11", "+third_party/amd", "+third_party/re2", "+third_party/smhasher", diff --git a/gpu/command_buffer/service/shader_translator.h b/gpu/command_buffer/service/shader_translator.h index 32097e25a24f13..dda955655af280 100644 --- a/gpu/command_buffer/service/shader_translator.h +++ b/gpu/command_buffer/service/shader_translator.h @@ -13,7 +13,12 @@ #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "gpu/gpu_export.h" + +#if defined(ANGLE_DX11) +#include "third_party/angle_dx11/include/GLSLANG/ShaderLang.h" +#else #include "third_party/angle/include/GLSLANG/ShaderLang.h" +#endif namespace gpu { namespace gles2 { diff --git a/gpu/command_buffer/service/shader_translator_cache.h b/gpu/command_buffer/service/shader_translator_cache.h index 1fbf98de796b23..a1057c5f20f036 100644 --- a/gpu/command_buffer/service/shader_translator_cache.h +++ b/gpu/command_buffer/service/shader_translator_cache.h @@ -12,7 +12,12 @@ #include "base/memory/ref_counted.h" #include "base/memory/singleton.h" #include "gpu/command_buffer/service/shader_translator.h" + +#if defined(ANGLE_DX11) +#include "third_party/angle_dx11/include/GLSLANG/ShaderLang.h" +#else #include "third_party/angle/include/GLSLANG/ShaderLang.h" +#endif namespace gpu { namespace gles2 { diff --git a/gpu/command_buffer_service.gypi b/gpu/command_buffer_service.gypi index 87b3999900ecbe..5ac5388b1bb28b 100644 --- a/gpu/command_buffer_service.gypi +++ b/gpu/command_buffer_service.gypi @@ -18,7 +18,7 @@ '../ui/gl/gl.gyp:gl', '../ui/surface/surface.gyp:surface', '../ui/ui.gyp:ui', - '../third_party/angle/src/build_angle.gyp:translator_glsl', + '<(angle_path)/src/build_angle.gyp:translator_glsl', '../third_party/khronos/khronos.gyp:khronos_headers', '../third_party/protobuf/protobuf.gyp:protobuf_lite', '../third_party/smhasher/smhasher.gyp:cityhash', diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp index bd6abb0a145818..2a04a3749161da 100644 --- a/gpu/gpu.gyp +++ b/gpu/gpu.gyp @@ -121,7 +121,7 @@ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', - '../third_party/angle/src/build_angle.gyp:translator_glsl', + '<(angle_path)/src/build_angle.gyp:translator_glsl', '../ui/gl/gl.gyp:gl', '../ui/ui.gyp:ui', 'command_buffer/command_buffer.gyp:gles2_utils', @@ -248,7 +248,7 @@ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', - '../third_party/angle/src/build_angle.gyp:translator_glsl', + '<(angle_path)/src/build_angle.gyp:translator_glsl', '../ui/ui.gyp:ui', 'command_buffer/command_buffer.gyp:gles2_utils', 'command_buffer_client', diff --git a/media/media.gyp b/media/media.gyp index d71454ee883b76..3a5e5f1cf920da 100644 --- a/media/media.gyp +++ b/media/media.gyp @@ -1359,8 +1359,8 @@ }], ['OS=="win"', { 'dependencies': [ - '../third_party/angle/src/build_angle.gyp:libEGL', - '../third_party/angle/src/build_angle.gyp:libGLESv2', + '<(angle_path)/src/build_angle.gyp:libEGL', + '<(angle_path)/src/build_angle.gyp:libGLESv2', ], 'sources': [ 'tools/shader_bench/window_win.cc', diff --git a/webkit/DEPS b/webkit/DEPS index d1f6f3395098fa..4056b1758d0fc6 100644 --- a/webkit/DEPS +++ b/webkit/DEPS @@ -12,6 +12,7 @@ include_rules = [ "+grit", # For generated headers "+skia", "+third_party/angle", + "+third_party/angle_dx11", "+third_party/hyphen", "+third_party/leveldatabase", "+third_party/skia", diff --git a/webkit/common/gpu/webgraphicscontext3d_in_process_impl.h b/webkit/common/gpu/webgraphicscontext3d_in_process_impl.h index 5c2cad5cb5e72d..25df2d880413da 100644 --- a/webkit/common/gpu/webgraphicscontext3d_in_process_impl.h +++ b/webkit/common/gpu/webgraphicscontext3d_in_process_impl.h @@ -13,7 +13,13 @@ #include "base/memory/ref_counted.h" #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" #include "third_party/WebKit/public/platform/WebString.h" + +#if defined(ANGLE_DX11) +#include "third_party/angle_dx11/include/GLSLANG/ShaderLang.h" +#else #include "third_party/angle/include/GLSLANG/ShaderLang.h" +#endif + #include "ui/gfx/native_widget_types.h" #include "webkit/common/gpu/webkit_gpu_export.h" diff --git a/webkit/common/gpu/webkit_gpu.gyp b/webkit/common/gpu/webkit_gpu.gyp index 3d04ca0e8e39c2..5694836d61c208 100644 --- a/webkit/common/gpu/webkit_gpu.gyp +++ b/webkit/common/gpu/webkit_gpu.gyp @@ -23,7 +23,7 @@ '<(DEPTH)/gpu/gpu.gyp:gles2_implementation', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink', - '<(DEPTH)/third_party/angle/src/build_angle.gyp:translator_glsl', + '<(angle_path)/src/build_angle.gyp:translator_glsl', '<(DEPTH)/ui/gl/gl.gyp:gl', '<(DEPTH)/ui/ui.gyp:ui', ],