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

Side by Side Diff: tests/VkUploadPixelsTests.cpp

Issue 2248703002: Fix copying of data in vulkan testing texture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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/GrVkGpu.cpp ('k') | 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 // This is a GPU-backend specific test. It relies on static intializers to work 8 // This is a GPU-backend specific test. It relies on static intializers to work
9 9
10 #include "SkTypes.h" 10 #include "SkTypes.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 SkAutoTMalloc<GrColor> dstBuffer(kWidth*kHeight); 59 SkAutoTMalloc<GrColor> dstBuffer(kWidth*kHeight);
60 60
61 fill_pixel_data(kWidth, kHeight, srcBuffer.get()); 61 fill_pixel_data(kWidth, kHeight, srcBuffer.get());
62 62
63 const GrVkCaps* caps = reinterpret_cast<const GrVkCaps*>(context->caps()); 63 const GrVkCaps* caps = reinterpret_cast<const GrVkCaps*>(context->caps());
64 64
65 bool canCreate = true; 65 bool canCreate = true;
66 // the expectation is that the given config is texturable/renderable with op timal tiling 66 // the expectation is that the given config is texturable/renderable with op timal tiling
67 // but may not be with linear tiling 67 // but may not be with linear tiling
68 if (linearTiling) { 68 if (linearTiling) {
69 if (!caps->isConfigTexurableLinearly(config) || 69 if (!caps->isConfigTexturableLinearly(config) ||
70 (renderTarget && !caps->isConfigRenderableLinearly(config, false))) { 70 (renderTarget && !caps->isConfigRenderableLinearly(config, false))) {
71 canCreate = false; 71 canCreate = false;
72 } 72 }
73 } 73 }
74 74
75 GrSurfaceDesc surfDesc; 75 GrSurfaceDesc surfDesc;
76 surfDesc.fFlags = renderTarget ? kRenderTarget_GrSurfaceFlag : kNone_GrSurfa ceFlags; 76 surfDesc.fFlags = renderTarget ? kRenderTarget_GrSurfaceFlag : kNone_GrSurfa ceFlags;
77 if (linearTiling) { 77 if (linearTiling) {
78 surfDesc.fFlags |= kZeroCopy_GrSurfaceFlag; 78 surfDesc.fFlags |= kZeroCopy_GrSurfaceFlag;
79 } 79 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, true, false); 137 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, true, false);
138 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, false, true); 138 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, false, true);
139 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, true, true); 139 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, true, true);
140 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, false, false); 140 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, false, false);
141 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, true, false); 141 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, true, false);
142 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, false, true); 142 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, false, true);
143 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, true, true); 143 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, true, true);
144 } 144 }
145 145
146 #endif 146 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698