Cleanup VulkanWindowContext for use on Android
authordjsollen <djsollen@google.com>
Fri, 10 Jun 2016 14:50:00 +0000 (07:50 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 10 Jun 2016 14:50:00 +0000 (07:50 -0700)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2058763002

Review-Url: https://codereview.chromium.org/2058763002

tools/viewer/Viewer.h
tools/viewer/sk_app/VulkanWindowContext.h
tools/viewer/sk_app/android/VulkanWindowContext_android.cpp
tools/viewer/sk_app/android/WindowContext_android.h [new file with mode: 0644]
tools/viewer/sk_app/android/Window_android.h

index 3a4164df16315f5fb1671e910ac7649f25291b3b..af3b6ce88d751789e526820bec00271fad518158 100644 (file)
@@ -13,6 +13,7 @@
 #include "sk_app/Window.h"
 #include "gm.h"
 #include "SkAnimTimer.h"
+#include "SkTouchGesture.h"
 #include "Slide.h"
 
 class SkCanvas;
index 50714011755486f5533a93b68afc6e15debbb799..63b52bc73f935eb1cea64a4b77d2e5a6d6060ad2 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef VulkanWindowContext_DEFINED
 #define VulkanWindowContext_DEFINED
 
+#include "SkTypes.h" // required to pull in any SkUserConfig defines
+
 #ifdef SK_VULKAN
 
 #include "vk/GrVkBackendContext.h"
index 5c6b7416a207a99784ed3f15d469be64bfb27874..15dc0b02f049a44c873814ab3376976f0307e289 100644 (file)
@@ -6,8 +6,8 @@
  * found in the LICENSE file.
  */
 
-#include "Window_android.h"
 #include "../VulkanWindowContext.h"
+#include "WindowContext_android.h"
 
 #include "vk/GrVkInterface.h"
 #include "vk/GrVkUtil.h"
diff --git a/tools/viewer/sk_app/android/WindowContext_android.h b/tools/viewer/sk_app/android/WindowContext_android.h
new file mode 100644 (file)
index 0000000..f0529fe
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+* Copyright 2016 Google Inc.
+*
+* Use of this source code is governed by a BSD-style license that can be
+* found in the LICENSE file.
+*/
+
+#ifndef WindowContext_android_DEFINED
+#define WindowContext_android_DEFINED
+
+#include <android/native_window_jni.h>
+
+namespace sk_app {
+
+struct ContextPlatformData_android {
+    ANativeWindow* fNativeWindow;
+};
+
+}   // namespace sk_app
+
+#endif // WindowContext_android_DEFINED
index 10c35d012202781477563dea441edb56d3a0ec7b..f61ad6ff16a4d08f20ed9f358a55b22f111a3af7 100644 (file)
@@ -8,17 +8,12 @@
 #ifndef Window_android_DEFINED
 #define Window_android_DEFINED
 
-#include <android/native_window_jni.h>
-
 #include "../Window.h"
+#include "WindowContext_android.h"
 #include "surface_glue_android.h"
 
 namespace sk_app {
 
-struct ContextPlatformData_android {
-    ANativeWindow* fNativeWindow;
-};
-
 class Window_android : public Window {
 public:
     Window_android() : Window() {}