Make ANGLE SampleApp work again
The code in views and samplecode wasn't being compiled in. Expand the
scope of the SK_ANGLE define to fix that. Add some missing deps too.
BUG=skia:
Change-Id: Id7b584457a21f171efc2339fb969c550379295e5
Reviewed-on: https://skia-review.googlesource.com/5575
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 078b205..790dd21 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -146,6 +146,9 @@
libs += [ "vulkan" ]
}
}
+ if (skia_use_angle) {
+ defines += [ "SK_ANGLE" ]
+ }
}
# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
@@ -806,7 +809,6 @@
}
if (skia_use_angle) {
- public_defines += [ "SK_ANGLE" ]
deps += [ "//third_party/angle2" ]
sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
}
@@ -956,6 +958,7 @@
"src/views/SkViewPriv.cpp",
]
libs = []
+ deps = []
if (!is_android) {
sources += [ "src/views/SkWindow.cpp" ]
}
@@ -980,6 +983,9 @@
} else if (is_win) {
sources += [ "src/views/win/SkOSWindow_win.cpp" ]
}
+ if (skia_use_angle) {
+ deps += [ "//third_party/angle2" ]
+ }
}
if (skia_use_lua) {
diff --git a/samplecode/SampleCode.cpp b/samplecode/SampleCode.cpp
index 7b9c0ff..bb55119 100644
--- a/samplecode/SampleCode.cpp
+++ b/samplecode/SampleCode.cpp
@@ -10,9 +10,6 @@
#if SK_SUPPORT_GPU
# include "GrContext.h"
-# if SK_ANGLE
-# include "gl/angle/GLTestContext_angle.h"
-# endif
#else
class GrContext;
#endif