| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrVkGpu.h" | 8 #include "GrVkGpu.h" |
| 9 | 9 |
| 10 #include "GrContextOptions.h" | 10 #include "GrContextOptions.h" |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 | 1034 |
| 1035 VkClearRect clearRect; | 1035 VkClearRect clearRect; |
| 1036 // Flip rect if necessary | 1036 // Flip rect if necessary |
| 1037 SkIRect vkRect = rect; | 1037 SkIRect vkRect = rect; |
| 1038 if (kBottomLeft_GrSurfaceOrigin == vkRT->origin()) { | 1038 if (kBottomLeft_GrSurfaceOrigin == vkRT->origin()) { |
| 1039 vkRect.fTop = vkRT->height() - rect.fBottom; | 1039 vkRect.fTop = vkRT->height() - rect.fBottom; |
| 1040 vkRect.fBottom = vkRT->height() - rect.fTop; | 1040 vkRect.fBottom = vkRT->height() - rect.fTop; |
| 1041 } | 1041 } |
| 1042 clearRect.rect.offset = { vkRect.fLeft, vkRect.fTop }; | 1042 clearRect.rect.offset = { vkRect.fLeft, vkRect.fTop }; |
| 1043 clearRect.rect.extent = { (uint32_t)vkRect.width(), (uint32_t)vkRect.hei
ght() }; | 1043 clearRect.rect.extent = { (uint32_t)vkRect.width(), (uint32_t)vkRect.hei
ght() }; |
| 1044 clearRect.baseArrayLayer = 0; |
| 1045 clearRect.layerCount = 1; |
| 1044 | 1046 |
| 1045 const GrVkRenderPass* renderPass = vkRT->simpleRenderPass(); | 1047 const GrVkRenderPass* renderPass = vkRT->simpleRenderPass(); |
| 1046 SkASSERT(renderPass); | 1048 SkASSERT(renderPass); |
| 1047 fCurrentCmdBuffer->beginRenderPass(this, renderPass, *vkRT); | 1049 fCurrentCmdBuffer->beginRenderPass(this, renderPass, *vkRT); |
| 1048 | 1050 |
| 1049 uint32_t colorIndex; | 1051 uint32_t colorIndex; |
| 1050 SkAssertResult(renderPass->colorAttachmentIndex(&colorIndex)); | 1052 SkAssertResult(renderPass->colorAttachmentIndex(&colorIndex)); |
| 1051 | 1053 |
| 1052 VkClearAttachment attachment; | 1054 VkClearAttachment attachment; |
| 1053 attachment.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; | 1055 attachment.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1410 int set_a_break_pt_here = 9; | 1412 int set_a_break_pt_here = 9; |
| 1411 aglSwapBuffers(aglGetCurrentContext()); | 1413 aglSwapBuffers(aglGetCurrentContext()); |
| 1412 #elif defined(SK_BUILD_FOR_WIN32) | 1414 #elif defined(SK_BUILD_FOR_WIN32) |
| 1413 SwapBuf(); | 1415 SwapBuf(); |
| 1414 int set_a_break_pt_here = 9; | 1416 int set_a_break_pt_here = 9; |
| 1415 SwapBuf(); | 1417 SwapBuf(); |
| 1416 #endif | 1418 #endif |
| 1417 #endif | 1419 #endif |
| 1418 } | 1420 } |
| 1419 | 1421 |
| OLD | NEW |