Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: tools/viewer/sk_app/android/Window_android.cpp

Issue 2169543002: Use Windowing system-specific WindowContext factories. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: more xlib Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/viewer/sk_app/android/Window_android.h ('k') | tools/viewer/sk_app/mac/GLWindowContext_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/sk_app/android/Window_android.cpp
diff --git a/tools/viewer/sk_app/android/Window_android.cpp b/tools/viewer/sk_app/android/Window_android.cpp
index 60d89eb3ece6013a4e9616653bae5a2b21550ccb..86f20be04784e39ca7cbad674162fa9039c86728 100644
--- a/tools/viewer/sk_app/android/Window_android.cpp
+++ b/tools/viewer/sk_app/android/Window_android.cpp
@@ -6,11 +6,8 @@
*/
#include "Window_android.h"
-#include "../GLWindowContext.h"
-#ifdef SK_VULKAN
-#include "../VulkanWindowContext.h"
-#endif
-#include "../RasterWindowContext.h"
+#include "WindowContextFactory_android.h"
+#include "../WindowContext.h"
namespace sk_app {
@@ -60,19 +57,17 @@ bool Window_android::attach(BackendType attachType, const DisplayParams& params)
void Window_android::initDisplay(ANativeWindow* window) {
SkASSERT(window);
- ContextPlatformData_android platformData;
- platformData.fNativeWindow = window;
switch (fBackendType) {
case kNativeGL_BackendType:
default:
- fWindowContext = GLWindowContext::Create((void*)&platformData, fDisplayParams);
+ fWindowContext = window_context_factory::NewGLForAndroid(window, fDisplayParams);
break;
case kRaster_BackendType:
- fWindowContext = RasterWindowContext::Create((void*)&platformData, fDisplayParams);
+ fWindowContext = window_context_factory::NewRasterForAndroid(window, fDisplayParams);
break;
#ifdef SK_VULKAN
case kVulkan_BackendType:
- fWindowContext = VulkanWindowContext::Create((void*)&platformData, fDisplayParams);
+ fWindowContext = window_context_factory::NewVulkanForAndroid(window, fDisplayParams);
break;
#endif
}
« no previous file with comments | « tools/viewer/sk_app/android/Window_android.h ('k') | tools/viewer/sk_app/mac/GLWindowContext_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698