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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 846303002: Make uncached textures uncached from the get go. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comment Created 5 years, 11 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/gl/GrGLVertexBuffer.cpp ('k') | tests/ResourceCacheTest.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 /* 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 218
219 bool GrDrawTarget::programUnitTest(int maxStages) { 219 bool GrDrawTarget::programUnitTest(int maxStages) {
220 GrGLGpu* gpu = static_cast<GrGLGpu*>(fContext->getGpu()); 220 GrGLGpu* gpu = static_cast<GrGLGpu*>(fContext->getGpu());
221 // setup dummy textures 221 // setup dummy textures
222 GrSurfaceDesc dummyDesc; 222 GrSurfaceDesc dummyDesc;
223 dummyDesc.fFlags = kRenderTarget_GrSurfaceFlag; 223 dummyDesc.fFlags = kRenderTarget_GrSurfaceFlag;
224 dummyDesc.fConfig = kSkia8888_GrPixelConfig; 224 dummyDesc.fConfig = kSkia8888_GrPixelConfig;
225 dummyDesc.fWidth = 34; 225 dummyDesc.fWidth = 34;
226 dummyDesc.fHeight = 18; 226 dummyDesc.fHeight = 18;
227 SkAutoTUnref<GrTexture> dummyTexture1(gpu->createTexture(dummyDesc, NULL, 0) ); 227 SkAutoTUnref<GrTexture> dummyTexture1(gpu->createTexture(dummyDesc, false, N ULL, 0));
228 dummyDesc.fFlags = kNone_GrSurfaceFlags; 228 dummyDesc.fFlags = kNone_GrSurfaceFlags;
229 dummyDesc.fConfig = kAlpha_8_GrPixelConfig; 229 dummyDesc.fConfig = kAlpha_8_GrPixelConfig;
230 dummyDesc.fWidth = 16; 230 dummyDesc.fWidth = 16;
231 dummyDesc.fHeight = 22; 231 dummyDesc.fHeight = 22;
232 SkAutoTUnref<GrTexture> dummyTexture2(gpu->createTexture(dummyDesc, NULL, 0) ); 232 SkAutoTUnref<GrTexture> dummyTexture2(gpu->createTexture(dummyDesc, false, N ULL, 0));
233 233
234 if (!dummyTexture1 || ! dummyTexture2) { 234 if (!dummyTexture1 || ! dummyTexture2) {
235 SkDebugf("Could not allocate dummy textures"); 235 SkDebugf("Could not allocate dummy textures");
236 return false; 236 return false;
237 } 237 }
238 238
239 GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2.get()}; 239 GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2.get()};
240 240
241 // dummy scissor state 241 // dummy scissor state
242 GrScissorState scissor; 242 GrScissorState scissor;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 } 363 }
364 #endif 364 #endif
365 GrTestTarget target; 365 GrTestTarget target;
366 context->getTestTarget(&target); 366 context->getTestTarget(&target);
367 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages )); 367 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages ));
368 } 368 }
369 } 369 }
370 } 370 }
371 371
372 #endif 372 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLVertexBuffer.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698