Lines Matching refs:grContext
29 static size_t getCacheUsage(GrDirectContext* grContext) { in getCacheUsage() argument
31 grContext->getResourceCacheUsage(nullptr, &cacheUsage); in getCacheUsage()
38 GrDirectContext* grContext = renderThread.getGrContext(); in RENDERTHREAD_SKIA_PIPELINE_TEST() local
39 ASSERT_TRUE(grContext != nullptr); in RENDERTHREAD_SKIA_PIPELINE_TEST()
45 while (getCacheUsage(grContext) <= renderThread.cacheManager().getBackgroundCacheSize()) { in RENDERTHREAD_SKIA_PIPELINE_TEST()
47 sk_sp<SkSurface> surface = SkSurface::MakeRenderTarget(grContext, SkBudgeted::kYes, info); in RENDERTHREAD_SKIA_PIPELINE_TEST()
50 grContext->flushAndSubmit(); in RENDERTHREAD_SKIA_PIPELINE_TEST()
58 ASSERT_TRUE(SkImage_pinAsTexture(image.get(), grContext)); in RENDERTHREAD_SKIA_PIPELINE_TEST()
62 ASSERT_TRUE(0 == grContext->getResourceCachePurgeableBytes()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
71 SkImage_unpinAsTexture(image.get(), grContext); in RENDERTHREAD_SKIA_PIPELINE_TEST()
74 const size_t purgeableBytes = grContext->getResourceCachePurgeableBytes(); in RENDERTHREAD_SKIA_PIPELINE_TEST()
79 ASSERT_TRUE(0 < grContext->getResourceCachePurgeableBytes()); in RENDERTHREAD_SKIA_PIPELINE_TEST()
80 ASSERT_TRUE(renderThread.cacheManager().getBackgroundCacheSize() > getCacheUsage(grContext)); in RENDERTHREAD_SKIA_PIPELINE_TEST()
84 ASSERT_TRUE(0 == grContext->getResourceCachePurgeableBytes()); in RENDERTHREAD_SKIA_PIPELINE_TEST()