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

Side by Side Diff: tests/ApplyGammaTest.cpp

Issue 1966013002: Turn ContextInfos returned by GrContextFactory into structs. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Address comment Created 4 years, 7 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 | « dm/DMSrcSink.cpp ('k') | tests/BitmapCopyTest.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 2016 Google Inc. 2 * Copyright 2016 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 <initializer_list> 8 #include <initializer_list>
9 #include "Test.h" 9 #include "Test.h"
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 uint8_t expectedComponent = SkScalarRoundToInt((lower + upper) * 127 .5f); 61 uint8_t expectedComponent = SkScalarRoundToInt((lower + upper) * 127 .5f);
62 expectedColor |= expectedComponent << (c * 8); 62 expectedColor |= expectedComponent << (c * 8);
63 } 63 }
64 64
65 *expected = expectedColor; 65 *expected = expectedColor;
66 return result; 66 return result;
67 } 67 }
68 } 68 }
69 69
70 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ApplyGamma, reporter, ctxInfo) { 70 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ApplyGamma, reporter, ctxInfo) {
71 GrContext* context = ctxInfo.fGrContext; 71 GrContext* context = ctxInfo.grContext();
72 static const int kW = 10; 72 static const int kW = 10;
73 static const int kH = 10; 73 static const int kH = 10;
74 static const size_t kRowBytes = sizeof(uint32_t) * kW; 74 static const size_t kRowBytes = sizeof(uint32_t) * kW;
75 75
76 GrSurfaceDesc baseDesc; 76 GrSurfaceDesc baseDesc;
77 baseDesc.fConfig = kRGBA_8888_GrPixelConfig; 77 baseDesc.fConfig = kRGBA_8888_GrPixelConfig;
78 baseDesc.fWidth = kW; 78 baseDesc.fWidth = kW;
79 baseDesc.fHeight = kH; 79 baseDesc.fHeight = kH;
80 80
81 SkAutoTMalloc<uint32_t> srcPixels(kW * kH); 81 SkAutoTMalloc<uint32_t> srcPixels(kW * kH);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 break; 147 break;
148 } 148 }
149 } 149 }
150 } 150 }
151 } 151 }
152 } 152 }
153 } 153 }
154 } 154 }
155 } 155 }
156 #endif 156 #endif
OLDNEW
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | tests/BitmapCopyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698