| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 for (uint32_t i = 0; i < fImageCount; ++i) { | 254 for (uint32_t i = 0; i < fImageCount; ++i) { |
| 255 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED; | 255 fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED; |
| 256 | 256 |
| 257 GrBackendRenderTargetDesc desc; | 257 GrBackendRenderTargetDesc desc; |
| 258 GrVkTextureInfo info; | 258 GrVkTextureInfo info; |
| 259 info.fImage = fImages[i]; | 259 info.fImage = fImages[i]; |
| 260 info.fAlloc = VK_NULL_HANDLE; | 260 info.fAlloc = VK_NULL_HANDLE; |
| 261 info.fImageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; | 261 info.fImageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; |
| 262 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; | 262 info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; |
| 263 info.fFormat = format; | 263 info.fFormat = format; |
| 264 info.fLevelCount = 1; |
| 264 desc.fWidth = fWidth; | 265 desc.fWidth = fWidth; |
| 265 desc.fHeight = fHeight; | 266 desc.fHeight = fHeight; |
| 266 desc.fConfig = fPixelConfig; | 267 desc.fConfig = fPixelConfig; |
| 267 desc.fOrigin = kTopLeft_GrSurfaceOrigin; | 268 desc.fOrigin = kTopLeft_GrSurfaceOrigin; |
| 268 desc.fSampleCnt = 0; | 269 desc.fSampleCnt = 0; |
| 269 desc.fStencilBits = 0; | 270 desc.fStencilBits = 0; |
| 270 desc.fRenderTargetHandle = (GrBackendObject) &info; | 271 desc.fRenderTargetHandle = (GrBackendObject) &info; |
| 271 SkSurfaceProps props(GrPixelConfigIsSRGB(fPixelConfig) | 272 SkSurfaceProps props(GrPixelConfigIsSRGB(fPixelConfig) |
| 272 ? SkSurfaceProps::kGammaCorrect_Flag : 0, | 273 ? SkSurfaceProps::kGammaCorrect_Flag : 0, |
| 273 kUnknown_SkPixelGeometry); | 274 kUnknown_SkPixelGeometry); |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 &fSwapchain, // pSwapchains | 581 &fSwapchain, // pSwapchains |
| 581 &backbuffer->fImageIndex, // pImageIndices | 582 &backbuffer->fImageIndex, // pImageIndices |
| 582 NULL // pResults | 583 NULL // pResults |
| 583 }; | 584 }; |
| 584 | 585 |
| 585 fQueuePresentKHR(fPresentQueue, &presentInfo); | 586 fQueuePresentKHR(fPresentQueue, &presentInfo); |
| 586 | 587 |
| 587 } | 588 } |
| 588 | 589 |
| 589 } //namespace sk_app | 590 } //namespace sk_app |
| OLD | NEW |