Update ImGui to latest stable version (1.77).
Also added various sk_app headers to BUILD.gn for ease of access. Change-Id: I99646c8f3906e00ca95f8e583319cb9b873c66ff Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300037 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
77d7d5ea92
commit
ab9578e9c6
22
BUILD.gn
22
BUILD.gn
@ -2239,24 +2239,36 @@ if (skia_enable_tools) {
|
||||
":skia",
|
||||
]
|
||||
sources = [
|
||||
"tools/sk_app/Application.h",
|
||||
"tools/sk_app/CommandSet.cpp",
|
||||
"tools/sk_app/CommandSet.h",
|
||||
"tools/sk_app/DisplayParams.h",
|
||||
"tools/sk_app/RasterWindowContext.h",
|
||||
"tools/sk_app/Window.cpp",
|
||||
"tools/sk_app/Window.h",
|
||||
"tools/sk_app/WindowContext.h",
|
||||
]
|
||||
libs = []
|
||||
|
||||
if (is_android) {
|
||||
sources += [
|
||||
"tools/sk_app/android/RasterWindowContext_android.cpp",
|
||||
"tools/sk_app/android/WindowContextFactory_android.h",
|
||||
"tools/sk_app/android/Window_android.cpp",
|
||||
"tools/sk_app/android/Window_android.h",
|
||||
"tools/sk_app/android/main_android.cpp",
|
||||
"tools/sk_app/android/surface_glue_android.cpp",
|
||||
"tools/sk_app/android/surface_glue_android.h",
|
||||
]
|
||||
libs += [ "android" ]
|
||||
} else if (is_linux) {
|
||||
sources += [
|
||||
"tools/sk_app/unix/RasterWindowContext_unix.cpp",
|
||||
"tools/sk_app/unix/WindowContextFactory_unix.h",
|
||||
"tools/sk_app/unix/Window_unix.cpp",
|
||||
"tools/sk_app/unix/Window_unix.h",
|
||||
"tools/sk_app/unix/keysym2ucs.c",
|
||||
"tools/sk_app/unix/keysym2ucs.h",
|
||||
"tools/sk_app/unix/main_unix.cpp",
|
||||
]
|
||||
libs += [
|
||||
@ -2266,12 +2278,16 @@ if (skia_enable_tools) {
|
||||
} else if (is_win) {
|
||||
sources += [
|
||||
"tools/sk_app/win/RasterWindowContext_win.cpp",
|
||||
"tools/sk_app/win/WindowContextFactory_win.h",
|
||||
"tools/sk_app/win/Window_win.cpp",
|
||||
"tools/sk_app/win/Window_win.h",
|
||||
"tools/sk_app/win/main_win.cpp",
|
||||
]
|
||||
} 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",
|
||||
"tools/sk_app/mac/main_mac.mm",
|
||||
]
|
||||
@ -2283,6 +2299,8 @@ if (skia_enable_tools) {
|
||||
} else if (is_ios) {
|
||||
sources += [
|
||||
"tools/sk_app/ios/RasterWindowContext_ios.mm",
|
||||
"tools/sk_app/ios/WindowContextFactory_ios.h",
|
||||
"tools/sk_app/ios/Window_ios.h",
|
||||
"tools/sk_app/ios/Window_ios.mm",
|
||||
"tools/sk_app/ios/main_ios.mm",
|
||||
]
|
||||
@ -2291,6 +2309,7 @@ if (skia_enable_tools) {
|
||||
|
||||
if (skia_use_gl) {
|
||||
sources += [ "tools/sk_app/GLWindowContext.cpp" ]
|
||||
sources += [ "tools/sk_app/GLWindowContext.h" ]
|
||||
if (is_android) {
|
||||
sources += [ "tools/sk_app/android/GLWindowContext_android.cpp" ]
|
||||
} else if (is_linux) {
|
||||
@ -2309,6 +2328,7 @@ if (skia_enable_tools) {
|
||||
|
||||
if (skia_use_vulkan) {
|
||||
sources += [ "tools/sk_app/VulkanWindowContext.cpp" ]
|
||||
sources += [ "tools/sk_app/VulkanWindowContext.h" ]
|
||||
if (is_android) {
|
||||
sources += [ "tools/sk_app/android/VulkanWindowContext_android.cpp" ]
|
||||
} else if (is_linux) {
|
||||
@ -2321,6 +2341,7 @@ if (skia_enable_tools) {
|
||||
|
||||
if (skia_use_metal) {
|
||||
sources += [ "tools/sk_app/MetalWindowContext.mm" ]
|
||||
sources += [ "tools/sk_app/MetalWindowContext.h" ]
|
||||
if (is_mac) {
|
||||
sources += [ "tools/sk_app/mac/MetalWindowContext_mac.mm" ]
|
||||
} else if (is_ios) {
|
||||
@ -2334,6 +2355,7 @@ if (skia_enable_tools) {
|
||||
|
||||
if (skia_use_dawn) {
|
||||
sources += [ "tools/sk_app/DawnWindowContext.cpp" ]
|
||||
sources += [ "tools/sk_app/DawnWindowContext.h" ]
|
||||
if (is_linux) {
|
||||
if (dawn_enable_vulkan) {
|
||||
sources += [ "tools/sk_app/unix/DawnVulkanWindowContext_unix.cpp" ]
|
||||
|
2
DEPS
2
DEPS
@ -21,7 +21,7 @@ deps = {
|
||||
"third_party/externals/freetype" : "https://skia.googlesource.com/third_party/freetype2.git@0a3d2bb99b45b72e1d45185ab054efa993d97210",
|
||||
"third_party/externals/harfbuzz" : "https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git@3a74ee528255cc027d84b204a87b5c25e47bff79",
|
||||
"third_party/externals/icu" : "https://chromium.googlesource.com/chromium/deps/icu.git@dbd3825b31041d782c5b504c59dcfb5ac7dda08c",
|
||||
"third_party/externals/imgui" : "https://skia.googlesource.com/external/github.com/ocornut/imgui.git@d38d7c6628bebd02692cfdd6fa76b4d992a35b75",
|
||||
"third_party/externals/imgui" : "https://skia.googlesource.com/external/github.com/ocornut/imgui.git@9418dcb69355558f70de260483424412c5ca2fce",
|
||||
"third_party/externals/libgifcodec" : "https://skia.googlesource.com/libgifcodec@d06d2a6d42baf6c0c91cacc28df2542a911d05fe",
|
||||
"third_party/externals/libjpeg-turbo" : "https://skia.googlesource.com/external/github.com/libjpeg-turbo/libjpeg-turbo.git@574f3a772c96dc9db2c98ef24706feb3f6dbda9a",
|
||||
"third_party/externals/libpng" : "https://skia.googlesource.com/third_party/libpng.git@386707c6d19b974ca2e3db7f5c61873813c6fe44",
|
||||
|
@ -72,7 +72,7 @@ struct DragCanvas {
|
||||
ImGui::SetCursorScreenPos(ImVec2(center.fX - 5, center.fY - 5));
|
||||
ImGui::InvisibleButton("", ImVec2(10, 10));
|
||||
|
||||
if (ImGui::IsItemActive() && ImGui::IsMouseDragging()) {
|
||||
if (ImGui::IsItemActive() && ImGui::IsMouseDragging(0)) {
|
||||
// Update screen position to track mouse, clamped to our area
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
center.set(SkTPin(io.MousePos.x, fPos.x, fPos.x + fSize.x),
|
||||
|
Loading…
Reference in New Issue
Block a user