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

Unified Diff: tools/viewer/sk_app/VulkanWindowContext.cpp

Issue 1999213002: Add Xlib support to viewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove viewer hack Created 4 years, 7 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
Index: tools/viewer/sk_app/VulkanWindowContext.cpp
diff --git a/tools/viewer/sk_app/VulkanWindowContext.cpp b/tools/viewer/sk_app/VulkanWindowContext.cpp
index bc200de42704a57ece5760bf082b1bbdf5490a02..2e2b8a988c01205f23d1e9bc6c64b93dd4d8ebc8 100644
--- a/tools/viewer/sk_app/VulkanWindowContext.cpp
+++ b/tools/viewer/sk_app/VulkanWindowContext.cpp
@@ -41,8 +41,9 @@ VulkanWindowContext::VulkanWindowContext(void* platformData, const DisplayParams
}
void VulkanWindowContext::initializeContext(void* platformData, const DisplayParams& params) {
+ fBackendContext.reset(GrVkBackendContext::Create(&fPresentQueueIndex, canPresent,
+ platformData));
- fBackendContext.reset(GrVkBackendContext::Create(&fPresentQueueIndex, canPresent));
if (!(fBackendContext->fExtensions & kKHR_surface_GrVkExtensionFlag) ||
!(fBackendContext->fExtensions & kKHR_swapchain_GrVkExtensionFlag)) {
fBackendContext.reset(nullptr);
@@ -147,6 +148,7 @@ bool VulkanWindowContext::createSwapchain(uint32_t width, uint32_t height,
} else if (extent.height > caps.maxImageExtent.height) {
extent.height = caps.maxImageExtent.height;
}
+
fWidth = (int)extent.width;
fHeight = (int)extent.height;
« no previous file with comments | « tools/viewer/sk_app/VulkanWindowContext.h ('k') | tools/viewer/sk_app/android/VulkanWindowContext_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698