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

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

Issue 1867883002: Fix a bunch of memory issues in Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@vkValgrind
Patch Set: Created 4 years, 8 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 | « src/gpu/vk/GrVkExtensions.cpp ('k') | src/gpu/vk/GrVkPipelineState.cpp » ('j') | 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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 srcImage->setImageLayout(this, 1202 srcImage->setImageLayout(this,
1203 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, 1203 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
1204 srcAccessMask, 1204 srcAccessMask,
1205 dstAccessMask, 1205 dstAccessMask,
1206 srcStageMask, 1206 srcStageMask,
1207 dstStageMask, 1207 dstStageMask,
1208 false); 1208 false);
1209 1209
1210 // Flip rect if necessary 1210 // Flip rect if necessary
1211 SkIRect srcVkRect; 1211 SkIRect srcVkRect;
1212 srcVkRect.fLeft = srcRect.fLeft;
1213 srcVkRect.fRight = srcRect.fRight;
1212 SkIRect dstRect; 1214 SkIRect dstRect;
1213 dstRect.fLeft = dstPoint.fX; 1215 dstRect.fLeft = dstPoint.fX;
1214 dstRect.fRight = dstPoint.fX + srcVkRect.width(); 1216 dstRect.fRight = dstPoint.fX + srcRect.width();
jvanverth1 2016/04/07 17:03:54 whoops
1215 1217
1216 if (kBottomLeft_GrSurfaceOrigin == src->origin()) { 1218 if (kBottomLeft_GrSurfaceOrigin == src->origin()) {
1217 srcVkRect.fTop = src->height() - srcRect.fBottom; 1219 srcVkRect.fTop = src->height() - srcRect.fBottom;
1218 srcVkRect.fBottom = src->height() - srcRect.fTop; 1220 srcVkRect.fBottom = src->height() - srcRect.fTop;
1219 } else { 1221 } else {
1220 srcVkRect = srcRect; 1222 srcVkRect.fTop = srcRect.fTop;
1223 srcVkRect.fBottom = srcRect.fBottom;
1221 } 1224 }
1222 1225
1223 if (kBottomLeft_GrSurfaceOrigin == dst->origin()) { 1226 if (kBottomLeft_GrSurfaceOrigin == dst->origin()) {
1224 dstRect.fTop = dst->height() - dstPoint.fY - srcVkRect.height(); 1227 dstRect.fTop = dst->height() - dstPoint.fY - srcVkRect.height();
1225 } else { 1228 } else {
1226 dstRect.fTop = dstPoint.fY; 1229 dstRect.fTop = dstPoint.fY;
1227 } 1230 }
1228 dstRect.fBottom = dstRect.fTop + srcVkRect.height(); 1231 dstRect.fBottom = dstRect.fTop + srcVkRect.height();
1229 1232
1230 // If we have different origins, we need to flip the top and bottom of the d st rect so that we 1233 // If we have different origins, we need to flip the top and bottom of the d st rect so that we
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 aglSwapBuffers(aglGetCurrentContext()); 1567 aglSwapBuffers(aglGetCurrentContext());
1565 int set_a_break_pt_here = 9; 1568 int set_a_break_pt_here = 9;
1566 aglSwapBuffers(aglGetCurrentContext()); 1569 aglSwapBuffers(aglGetCurrentContext());
1567 #elif defined(SK_BUILD_FOR_WIN32) 1570 #elif defined(SK_BUILD_FOR_WIN32)
1568 SwapBuf(); 1571 SwapBuf();
1569 int set_a_break_pt_here = 9; 1572 int set_a_break_pt_here = 9;
1570 SwapBuf(); 1573 SwapBuf();
1571 #endif 1574 #endif
1572 #endif 1575 #endif
1573 } 1576 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkExtensions.cpp ('k') | src/gpu/vk/GrVkPipelineState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698