OLD | NEW |
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 | 233 |
234 // set up initial image layouts and create surfaces | 234 // set up initial image layouts and create surfaces |
235 fImageLayouts = new VkImageLayout[fImageCount]; | 235 fImageLayouts = new VkImageLayout[fImageCount]; |
236 fSurfaces = new sk_sp<SkSurface>[fImageCount]; | 236 fSurfaces = new sk_sp<SkSurface>[fImageCount]; |
237 for (uint32_t i = 0; i < fImageCount; ++i) { | 237 for (uint32_t i = 0; i < fImageCount; ++i) { |
238 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED; | 238 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED; |
239 | 239 |
240 GrBackendRenderTargetDesc desc; | 240 GrBackendRenderTargetDesc desc; |
241 GrVkTextureInfo info; | 241 GrVkTextureInfo info; |
242 info.fImage = fImages[i]; | 242 info.fImage = fImages[i]; |
243 info.fAlloc = nullptr; | 243 info.fAlloc = VK_NULL_HANDLE; |
244 info.fImageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; | 244 info.fImageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; |
245 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; | 245 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; |
246 info.fFormat = format; | 246 info.fFormat = format; |
247 desc.fWidth = fWidth; | 247 desc.fWidth = fWidth; |
248 desc.fHeight = fHeight; | 248 desc.fHeight = fHeight; |
249 desc.fConfig = fPixelConfig; | 249 desc.fConfig = fPixelConfig; |
250 desc.fOrigin = kTopLeft_GrSurfaceOrigin; | 250 desc.fOrigin = kTopLeft_GrSurfaceOrigin; |
251 desc.fSampleCnt = 0; | 251 desc.fSampleCnt = 0; |
252 desc.fStencilBits = 0; | 252 desc.fStencilBits = 0; |
253 desc.fRenderTargetHandle = (GrBackendObject) &info; | 253 desc.fRenderTargetHandle = (GrBackendObject) &info; |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 &backbuffer->fRenderSemaphore, // pWaitSemaphores | 559 &backbuffer->fRenderSemaphore, // pWaitSemaphores |
560 1, // swapchainCount | 560 1, // swapchainCount |
561 &fSwapchain, // pSwapchains | 561 &fSwapchain, // pSwapchains |
562 &backbuffer->fImageIndex, // pImageIndices | 562 &backbuffer->fImageIndex, // pImageIndices |
563 NULL // pResults | 563 NULL // pResults |
564 }; | 564 }; |
565 | 565 |
566 fQueuePresentKHR(fPresentQueue, &presentInfo); | 566 fQueuePresentKHR(fPresentQueue, &presentInfo); |
567 | 567 |
568 } | 568 } |
OLD | NEW |