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 "GrRenderTarget.h" | 10 #include "GrRenderTarget.h" |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 // set up initial image layouts and create surfaces | 256 // set up initial image layouts and create surfaces |
257 fImageLayouts = new VkImageLayout[fImageCount]; | 257 fImageLayouts = new VkImageLayout[fImageCount]; |
258 fSurfaces = new sk_sp<SkSurface>[fImageCount]; | 258 fSurfaces = new sk_sp<SkSurface>[fImageCount]; |
259 for (uint32_t i = 0; i < fImageCount; ++i) { | 259 for (uint32_t i = 0; i < fImageCount; ++i) { |
260 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED; | 260 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED; |
261 | 261 |
262 GrBackendRenderTargetDesc desc; | 262 GrBackendRenderTargetDesc desc; |
263 GrVkImageInfo info; | 263 GrVkImageInfo info; |
264 info.fImage = fImages[i]; | 264 info.fImage = fImages[i]; |
265 info.fAlloc = { VK_NULL_HANDLE, 0, 0 }; | 265 info.fAlloc = { VK_NULL_HANDLE, 0, 0, 0 }; |
266 info.fImageLayout = VK_IMAGE_LAYOUT_UNDEFINED; | 266 info.fImageLayout = VK_IMAGE_LAYOUT_UNDEFINED; |
267 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; | 267 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; |
268 info.fFormat = format; | 268 info.fFormat = format; |
269 info.fLevelCount = 1; | 269 info.fLevelCount = 1; |
270 desc.fWidth = fWidth; | 270 desc.fWidth = fWidth; |
271 desc.fHeight = fHeight; | 271 desc.fHeight = fHeight; |
272 desc.fConfig = fPixelConfig; | 272 desc.fConfig = fPixelConfig; |
273 desc.fOrigin = kTopLeft_GrSurfaceOrigin; | 273 desc.fOrigin = kTopLeft_GrSurfaceOrigin; |
274 desc.fSampleCnt = 0; | 274 desc.fSampleCnt = 0; |
275 desc.fStencilBits = 0; | 275 desc.fStencilBits = 0; |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 1, // swapchainCount | 597 1, // swapchainCount |
598 &fSwapchain, // pSwapchains | 598 &fSwapchain, // pSwapchains |
599 &backbuffer->fImageIndex, // pImageIndices | 599 &backbuffer->fImageIndex, // pImageIndices |
600 NULL // pResults | 600 NULL // pResults |
601 }; | 601 }; |
602 | 602 |
603 fQueuePresentKHR(fPresentQueue, &presentInfo); | 603 fQueuePresentKHR(fPresentQueue, &presentInfo); |
604 } | 604 } |
605 | 605 |
606 } //namespace sk_app | 606 } //namespace sk_app |
OLD | NEW |