Revert "Fix sk_app macOS raster window build conditions."
This reverts commit 163ba10dde
.
Reason for revert: Mac linker errors
Original change's description:
> Fix sk_app macOS raster window build conditions.
>
> The "raster" window on macOS is actually backed by GL. Fix the build
> rules and code conditions to reflect this. This allows for some sk_app
> applications to run on macOS with skia_use_gl=false.
>
> Change-Id: I5d7b37c4172079e163690faa4e55a622a6d4f844
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=bungeman@google.com,brianosman@google.com
Change-Id: Ie5fa24138e4387784c21559f28528a4c4d335626
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397737
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
163ba10dde
commit
9d4741370c
8
BUILD.gn
8
BUILD.gn
@ -2557,6 +2557,7 @@ if (skia_enable_tools) {
|
||||
]
|
||||
} else if (is_mac) {
|
||||
sources += [
|
||||
"tools/sk_app/mac/RasterWindowContext_mac.mm",
|
||||
"tools/sk_app/mac/WindowContextFactory_mac.h",
|
||||
"tools/sk_app/mac/Window_mac.h",
|
||||
"tools/sk_app/mac/Window_mac.mm",
|
||||
@ -2591,10 +2592,7 @@ if (skia_enable_tools) {
|
||||
sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ]
|
||||
}
|
||||
} else if (is_mac) {
|
||||
sources += [
|
||||
"tools/sk_app/mac/GLWindowContext_mac.mm",
|
||||
"tools/sk_app/mac/RasterWindowContext_mac.mm",
|
||||
]
|
||||
sources += [ "tools/sk_app/mac/GLWindowContext_mac.mm" ]
|
||||
} else if (is_ios) {
|
||||
sources += [ "tools/sk_app/ios/GLWindowContext_ios.mm" ]
|
||||
}
|
||||
@ -2865,7 +2863,7 @@ if (skia_enable_tools) {
|
||||
]
|
||||
}
|
||||
|
||||
if (skia_use_icu && skia_use_harfbuzz) {
|
||||
if (skia_use_gl && skia_use_icu && skia_use_harfbuzz) {
|
||||
test_app("editor") {
|
||||
is_shared_library = is_android
|
||||
deps = [ "modules/skplaintexteditor:editor_app" ]
|
||||
|
@ -366,17 +366,8 @@ struct EditorLayer : public sk_app::Window::Layer {
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef SK_VULKAN
|
||||
static constexpr sk_app::Window::BackendType kBackendType = sk_app::Window::kVulkan_BackendType;
|
||||
#elif SK_METAL
|
||||
static constexpr sk_app::Window::BackendType kBackendType = sk_app::Window::kMetal_BackendType;
|
||||
#elif SK_GL
|
||||
//static constexpr sk_app::Window::BackendType kBackendType = sk_app::Window::kRaster_BackendType;
|
||||
static constexpr sk_app::Window::BackendType kBackendType = sk_app::Window::kNativeGL_BackendType;
|
||||
#elif SK_DAWN
|
||||
static constexpr sk_app::Window::BackendType kBackendType = sk_app::Window::kDawn_BackendType;
|
||||
#else
|
||||
static constexpr sk_app::Window::BackendType kBackendType = sk_app::Window::kRaster_BackendType;
|
||||
#endif
|
||||
|
||||
struct EditorApplication : public sk_app::Application {
|
||||
std::unique_ptr<sk_app::Window> fWindow;
|
||||
|
@ -35,22 +35,18 @@ struct MacWindowInfo {
|
||||
NSView* fMainView;
|
||||
};
|
||||
|
||||
#ifdef SK_VULKAN
|
||||
inline std::unique_ptr<WindowContext> MakeVulkanForMac(const MacWindowInfo&, const DisplayParams&) {
|
||||
// No Vulkan support on Mac.
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SK_GL
|
||||
std::unique_ptr<WindowContext> MakeRasterForMac(const MacWindowInfo&, const DisplayParams&);
|
||||
std::unique_ptr<WindowContext> MakeGLForMac(const MacWindowInfo&, const DisplayParams&);
|
||||
#endif
|
||||
|
||||
#ifdef SK_DAWN
|
||||
std::unique_ptr<WindowContext> MakeDawnMTLForMac(const MacWindowInfo&, const DisplayParams&);
|
||||
#endif
|
||||
|
||||
std::unique_ptr<WindowContext> MakeRasterForMac(const MacWindowInfo&, const DisplayParams&);
|
||||
#ifdef SK_METAL
|
||||
std::unique_ptr<WindowContext> MakeMetalForMac(const MacWindowInfo&, const DisplayParams&);
|
||||
#endif
|
||||
|
@ -139,14 +139,15 @@ bool Window_mac::attach(BackendType attachType) {
|
||||
#endif
|
||||
#ifdef SK_GL
|
||||
case kNativeGL_BackendType:
|
||||
default:
|
||||
fWindowContext = MakeGLForMac(info, fRequestedDisplayParams);
|
||||
break;
|
||||
#else
|
||||
default:
|
||||
#endif
|
||||
case kRaster_BackendType:
|
||||
fWindowContext = MakeRasterForMac(info, fRequestedDisplayParams);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
SkASSERT_RELEASE(false);
|
||||
}
|
||||
this->onBackendCreated();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user