OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 // This is a GPU-backend specific test. It relies on static intializers to work | 9 // This is a GPU-backend specific test. It relies on static intializers to work |
10 | 10 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 if (random->nextBool()) { | 193 if (random->nextBool()) { |
194 pipelineBuilder->setStencil(kDoesWriteStencil); | 194 pipelineBuilder->setStencil(kDoesWriteStencil); |
195 } else { | 195 } else { |
196 pipelineBuilder->setStencil(kDoesNotWriteStencil); | 196 pipelineBuilder->setStencil(kDoesNotWriteStencil); |
197 } | 197 } |
198 } | 198 } |
199 | 199 |
200 bool GrDrawTarget::programUnitTest(GrContext* context, int maxStages) { | 200 bool GrDrawTarget::programUnitTest(GrContext* context, int maxStages) { |
201 // setup dummy textures | 201 // setup dummy textures |
202 GrSurfaceDesc dummyDesc; | 202 GrSurfaceDesc dummyDesc; |
203 dummyDesc.fFlags = kRenderTarget_GrSurfaceFlag; | |
204 dummyDesc.fConfig = kSkia8888_GrPixelConfig; | 203 dummyDesc.fConfig = kSkia8888_GrPixelConfig; |
205 dummyDesc.fWidth = 34; | 204 dummyDesc.fWidth = 34; |
206 dummyDesc.fHeight = 18; | 205 dummyDesc.fHeight = 18; |
207 SkAutoTUnref<GrTexture> dummyTexture1( | 206 SkAutoTUnref<GrTexture> dummyTexture1( |
208 fResourceProvider->createTexture(dummyDesc, false, NULL, 0)); | 207 fResourceProvider->createTexture(dummyDesc, false, NULL, 0)); |
209 dummyDesc.fFlags = kNone_GrSurfaceFlags; | 208 dummyDesc.fFlags = kNone_GrSurfaceFlags; |
210 dummyDesc.fConfig = kAlpha_8_GrPixelConfig; | 209 dummyDesc.fConfig = kAlpha_8_GrPixelConfig; |
211 dummyDesc.fWidth = 16; | 210 dummyDesc.fWidth = 16; |
212 dummyDesc.fHeight = 22; | 211 dummyDesc.fHeight = 22; |
213 SkAutoTUnref<GrTexture> dummyTexture2( | 212 SkAutoTUnref<GrTexture> dummyTexture2( |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 } | 298 } |
300 #endif | 299 #endif |
301 GrTestTarget target; | 300 GrTestTarget target; |
302 context->getTestTarget(&target); | 301 context->getTestTarget(&target); |
303 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context,
maxStages)); | 302 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context,
maxStages)); |
304 } | 303 } |
305 } | 304 } |
306 } | 305 } |
307 | 306 |
308 #endif | 307 #endif |
OLD | NEW |