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

Side by Side Diff: tools/viewer/sk_app/VulkanWindowContext.cpp

Issue 2011473003: Add OpenGL support to Linux viewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Repatched the patch Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « tools/viewer/Viewer.cpp ('k') | tools/viewer/sk_app/Window.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrRenderTarget.h" 10 #include "GrRenderTarget.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 VulkanWindowContext::~VulkanWindowContext() { 382 VulkanWindowContext::~VulkanWindowContext() {
383 this->destroyContext(); 383 this->destroyContext();
384 } 384 }
385 385
386 void VulkanWindowContext::destroyContext() { 386 void VulkanWindowContext::destroyContext() {
387 if (!fBackendContext.get()) { 387 if (!fBackendContext.get()) {
388 return; 388 return;
389 } 389 }
390 390
391 GR_VK_CALL(fBackendContext->fInterface, QueueWaitIdle(fPresentQueue));
391 GR_VK_CALL(fBackendContext->fInterface, DeviceWaitIdle(fBackendContext->fDev ice)); 392 GR_VK_CALL(fBackendContext->fInterface, DeviceWaitIdle(fBackendContext->fDev ice));
392 393
393 this->destroyBuffers(); 394 this->destroyBuffers();
394 395
395 if (VK_NULL_HANDLE != fCommandPool) { 396 if (VK_NULL_HANDLE != fCommandPool) {
396 GR_VK_CALL(fBackendContext->fInterface, DestroyCommandPool(fBackendConte xt->fDevice, 397 GR_VK_CALL(fBackendContext->fInterface, DestroyCommandPool(fBackendConte xt->fDevice,
397 fCommandPool, nullptr)); 398 fCommandPool, nullptr));
398 fCommandPool = VK_NULL_HANDLE; 399 fCommandPool = VK_NULL_HANDLE;
399 } 400 }
400 401
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 &fSwapchain, // pSwapchains 595 &fSwapchain, // pSwapchains
595 &backbuffer->fImageIndex, // pImageIndices 596 &backbuffer->fImageIndex, // pImageIndices
596 NULL // pResults 597 NULL // pResults
597 }; 598 };
598 599
599 fQueuePresentKHR(fPresentQueue, &presentInfo); 600 fQueuePresentKHR(fPresentQueue, &presentInfo);
600 601
601 } 602 }
602 603
603 } //namespace sk_app 604 } //namespace sk_app
OLDNEW
« no previous file with comments | « tools/viewer/Viewer.cpp ('k') | tools/viewer/sk_app/Window.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698