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

Side by Side Diff: tests/VkUploadPixelsTests.cpp

Issue 2078483002: Start using GrGpuCommandBuffer in GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@memoryWAR
Patch Set: remove errant lines Created 4 years, 5 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 | « tests/VkClearTests.cpp ('k') | tools/gpu/GrTest.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 // 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 srcPtr += width; 46 srcPtr += width;
47 dstPtr += width; 47 dstPtr += width;
48 } 48 }
49 return true; 49 return true;
50 } 50 }
51 51
52 void basic_texture_test(skiatest::Reporter* reporter, GrContext* context, GrPixe lConfig config, 52 void basic_texture_test(skiatest::Reporter* reporter, GrContext* context, GrPixe lConfig config,
53 bool renderTarget, bool linearTiling) { 53 bool renderTarget, bool linearTiling) {
54 GrVkGpu* gpu = static_cast<GrVkGpu*>(context->getGpu()); 54 GrVkGpu* gpu = static_cast<GrVkGpu*>(context->getGpu());
55 gpu->discard(NULL);
56 55
57 const int kWidth = 16; 56 const int kWidth = 16;
58 const int kHeight = 16; 57 const int kHeight = 16;
59 SkAutoTMalloc<GrColor> srcBuffer(kWidth*kHeight); 58 SkAutoTMalloc<GrColor> srcBuffer(kWidth*kHeight);
60 SkAutoTMalloc<GrColor> dstBuffer(kWidth*kHeight); 59 SkAutoTMalloc<GrColor> dstBuffer(kWidth*kHeight);
61 60
62 fill_pixel_data(kWidth, kHeight, srcBuffer.get()); 61 fill_pixel_data(kWidth, kHeight, srcBuffer.get());
63 62
64 const GrVkCaps* caps = reinterpret_cast<const GrVkCaps*>(context->caps()); 63 const GrVkCaps* caps = reinterpret_cast<const GrVkCaps*>(context->caps());
65 64
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, true, false); 137 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, true, false);
139 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, false, true); 138 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, false, true);
140 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, true, true); 139 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_GrPixelConfig, true, true);
141 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, false, false); 140 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, false, false);
142 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, true, false); 141 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, true, false);
143 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, false, true); 142 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, false, true);
144 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, true, true); 143 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_GrPixelConfig, true, true);
145 } 144 }
146 145
147 #endif 146 #endif
OLDNEW
« no previous file with comments | « tests/VkClearTests.cpp ('k') | tools/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698