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

Side by Side Diff: tools/vulkan/VulkanTestContext.cpp

Issue 1872283003: Vulkan config in dm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-gpu build Created 4 years, 8 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/gpu/GrContextFactory.cpp ('k') | no next file » | 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 "SkSurface.h" 10 #include "SkSurface.h"
(...skipping 15 matching lines...) Expand all
26 , fBackbuffers(nullptr) { 26 , fBackbuffers(nullptr) {
27 27
28 // any config code here (particularly for msaa)? 28 // any config code here (particularly for msaa)?
29 29
30 this->initializeContext(platformData); 30 this->initializeContext(platformData);
31 } 31 }
32 32
33 void VulkanTestContext::initializeContext(void* platformData) { 33 void VulkanTestContext::initializeContext(void* platformData) {
34 34
35 fBackendContext.reset(GrVkBackendContext::Create()); 35 fBackendContext.reset(GrVkBackendContext::Create());
36 fBackendContext->ref();
37 36
38 fContext = GrContext::Create(kVulkan_GrBackend, (GrBackendContext)fBackendCo ntext.get()); 37 fContext = GrContext::Create(kVulkan_GrBackend, (GrBackendContext)fBackendCo ntext.get());
39 38
40 fSurface = createVkSurface(platformData); 39 fSurface = createVkSurface(platformData);
41 if (VK_NULL_HANDLE == fSurface) { 40 if (VK_NULL_HANDLE == fSurface) {
42 fBackendContext.reset(nullptr); 41 fBackendContext.reset(nullptr);
43 return; 42 return;
44 } 43 }
45 44
46 // query to get the initial queue props size 45 // query to get the initial queue props size
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 1, // swapchainCount 596 1, // swapchainCount
598 &fSwapchain, // pSwapchains 597 &fSwapchain, // pSwapchains
599 &backbuffer->fImageIndex, // pImageIndices 598 &backbuffer->fImageIndex, // pImageIndices
600 NULL // pResults 599 NULL // pResults
601 }; 600 };
602 601
603 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface, 602 GR_VK_CALL_ERRCHECK(fBackendContext->fInterface,
604 QueuePresentKHR(fPresentQueue, &presentInfo)); 603 QueuePresentKHR(fPresentQueue, &presentInfo));
605 604
606 } 605 }
OLDNEW
« no previous file with comments | « tools/gpu/GrContextFactory.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698