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

Side by Side Diff: src/gpu/vk/GrVkGpu.cpp

Issue 1765863003: Fix stall in Vk clear (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | 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 * 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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698