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

Side by Side Diff: tests/ResourceCacheTest.cpp

Issue 2381033002: Explicit control in tools of ANGLE frontend and backend (Closed)
Patch Set: rebase infra training Created 4 years, 2 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/FloatingPointTextureTest.cpp ('k') | tests/Test.h » ('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 2013 Google Inc. 2 * Copyright 2013 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 here to ensure SK_SUPPORT_GPU is set correctly before it is examined. 8 // Include here to ensure SK_SUPPORT_GPU is set correctly before it is examined.
9 #include "SkTypes.h" 9 #include "SkTypes.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 size_t curCacheSize; 73 size_t curCacheSize;
74 context->getResourceCacheUsage(nullptr, &curCacheSize); 74 context->getResourceCacheUsage(nullptr, &curCacheSize);
75 75
76 // we should never go over the size limit 76 // we should never go over the size limit
77 REPORTER_ASSERT(reporter, curCacheSize <= maxCacheSize); 77 REPORTER_ASSERT(reporter, curCacheSize <= maxCacheSize);
78 } 78 }
79 79
80 context->setResourceCacheLimits(oldMaxNum, oldMaxBytes); 80 context->setResourceCacheLimits(oldMaxNum, oldMaxBytes);
81 } 81 }
82 82
83 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheStencilBuffers, reporter, ctxInf o) { 83 static bool is_rendering_and_not_angle_es3(sk_gpu_test::GrContextFactory::Contex tType type) {
84 if (type == sk_gpu_test::GrContextFactory::kANGLE_D3D11_ES3_ContextType ||
85 type == sk_gpu_test::GrContextFactory::kANGLE_GL_ES3_ContextType) {
86 return false;
87 }
88 return sk_gpu_test::GrContextFactory::IsRenderingContext(type);
89 }
90
91 // This currently fails on ES3 ANGLE contexts
92 DEF_GPUTEST_FOR_CONTEXTS(ResourceCacheStencilBuffers, &is_rendering_and_not_angl e_es3, reporter,
93 ctxInfo) {
84 GrContext* context = ctxInfo.grContext(); 94 GrContext* context = ctxInfo.grContext();
85 GrSurfaceDesc smallDesc; 95 GrSurfaceDesc smallDesc;
86 smallDesc.fFlags = kRenderTarget_GrSurfaceFlag; 96 smallDesc.fFlags = kRenderTarget_GrSurfaceFlag;
87 smallDesc.fConfig = kSkia8888_GrPixelConfig; 97 smallDesc.fConfig = kSkia8888_GrPixelConfig;
88 smallDesc.fWidth = 4; 98 smallDesc.fWidth = 4;
89 smallDesc.fHeight = 4; 99 smallDesc.fHeight = 4;
90 smallDesc.fSampleCnt = 0; 100 smallDesc.fSampleCnt = 0;
91 101
92 GrTextureProvider* cache = context->textureProvider(); 102 GrTextureProvider* cache = context->textureProvider();
93 GrResourceProvider* resourceProvider = context->resourceProvider(); 103 GrResourceProvider* resourceProvider = context->resourceProvider();
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 test_cache_chained_purge(reporter); 1337 test_cache_chained_purge(reporter);
1328 test_resource_size_changed(reporter); 1338 test_resource_size_changed(reporter);
1329 test_timestamp_wrap(reporter); 1339 test_timestamp_wrap(reporter);
1330 test_flush(reporter); 1340 test_flush(reporter);
1331 test_large_resource_count(reporter); 1341 test_large_resource_count(reporter);
1332 test_custom_data(reporter); 1342 test_custom_data(reporter);
1333 test_abandoned(reporter); 1343 test_abandoned(reporter);
1334 } 1344 }
1335 1345
1336 #endif 1346 #endif
OLDNEW
« no previous file with comments | « tests/FloatingPointTextureTest.cpp ('k') | tests/Test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698