Lines Matching refs:context
53 for (Context& context : fContexts) { in destroyContexts()
54 if (context.fTestContext) { in destroyContexts()
55 context.fTestContext->makeCurrent(); in destroyContexts()
57 if (!context.fGrContext->unique()) { in destroyContexts()
58 context.fGrContext->releaseResourcesAndAbandonContext(); in destroyContexts()
59 context.fAbandoned = true; in destroyContexts()
61 context.fGrContext->unref(); in destroyContexts()
62 delete context.fTestContext; in destroyContexts()
68 for (Context& context : fContexts) { in abandonContexts()
69 if (!context.fAbandoned) { in abandonContexts()
70 if (context.fTestContext) { in abandonContexts()
71 context.fTestContext->makeCurrent(); in abandonContexts()
72 context.fTestContext->testAbandon(); in abandonContexts()
73 delete(context.fTestContext); in abandonContexts()
74 context.fTestContext = nullptr; in abandonContexts()
76 context.fGrContext->abandonContext(); in abandonContexts()
77 context.fAbandoned = true; in abandonContexts()
83 for (Context& context : fContexts) { in releaseResourcesAndAbandonContexts()
84 if (!context.fAbandoned) { in releaseResourcesAndAbandonContexts()
85 if (context.fTestContext) { in releaseResourcesAndAbandonContexts()
86 context.fTestContext->makeCurrent(); in releaseResourcesAndAbandonContexts()
88 context.fGrContext->releaseResourcesAndAbandonContext(); in releaseResourcesAndAbandonContexts()
89 context.fAbandoned = true; in releaseResourcesAndAbandonContexts()
90 if (context.fTestContext) { in releaseResourcesAndAbandonContexts()
91 delete context.fTestContext; in releaseResourcesAndAbandonContexts()
92 context.fTestContext = nullptr; in releaseResourcesAndAbandonContexts()
104 Context& context = fContexts[i]; in getContextInfoInternal() local
105 if (context.fType == type && in getContextInfoInternal()
106 context.fOverrides == overrides && in getContextInfoInternal()
107 context.fShareContext == shareContext && in getContextInfoInternal()
108 context.fShareIndex == shareIndex && in getContextInfoInternal()
109 !context.fAbandoned) { in getContextInfoInternal()
110 context.fTestContext->makeCurrent(); in getContextInfoInternal()
111 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContext); in getContextInfoInternal()
253 Context& context = fContexts.push_back(); in getContextInfoInternal() local
254 context.fBackend = backend; in getContextInfoInternal()
255 context.fTestContext = testCtx.release(); in getContextInfoInternal()
256 context.fGrContext = SkRef(grCtx.get()); in getContextInfoInternal()
257 context.fType = type; in getContextInfoInternal()
258 context.fOverrides = overrides; in getContextInfoInternal()
259 context.fAbandoned = false; in getContextInfoInternal()
260 context.fShareContext = shareContext; in getContextInfoInternal()
261 context.fShareIndex = shareIndex; in getContextInfoInternal()
262 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContext); in getContextInfoInternal()