Skip to content

Commit

Permalink
Make it possible to switch between two different versions of ANGLE.
Browse files Browse the repository at this point in the history
One is the existing one and the default with this patch: third_party/angle.
The other is third_party/angle_dx11, which will pulled in via DEPS in another patch.

BUG=247158
TBR=xhwang@chromium.org
Review URL: https://codereview.chromium.org/16737007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205962 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
apatrick@chromium.org committed Jun 12, 2013
1 parent dd946bb commit c91dc72
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build/all.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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:*',
Expand Down
11 changes: 11 additions & 0 deletions build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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': [
Expand Down
1 change: 1 addition & 0 deletions content/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions content/browser/gpu/gpu_internals_ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions content/content_gpu.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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': [
Expand Down
4 changes: 2 additions & 2 deletions content/content_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
Expand Down
1 change: 1 addition & 0 deletions gpu/DEPS
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 5 additions & 0 deletions gpu/command_buffer/service/shader_translator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 5 additions & 0 deletions gpu/command_buffer/service/shader_translator_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion gpu/command_buffer_service.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions gpu/gpu.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions media/media.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions webkit/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions webkit/common/gpu/webgraphicscontext3d_in_process_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion webkit/common/gpu/webkit_gpu.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
Expand Down

0 comments on commit c91dc72

Please sign in to comment.