Home
last modified time | relevance | path

Searched refs:grContext (Results 1 – 25 of 106) sorted by relevance

12345

/third_party/flutter/skia/tests/
DGrContextFactoryTest.cpp23 if (!info1.grContext()) { in DEF_GPUTEST()
28 info1.grContext()->ref(); in DEF_GPUTEST()
33 REPORTER_ASSERT(reporter, info2.grContext()); in DEF_GPUTEST()
36 REPORTER_ASSERT(reporter, info1.grContext() != info2.grContext()); in DEF_GPUTEST()
39 info1.grContext()->unref(); in DEF_GPUTEST()
48 if (!info1.grContext()) { in DEF_GPUTEST()
53 info1.grContext()->ref(); in DEF_GPUTEST()
57 ContextInfo info2 = testFactory.getSharedContextInfo(info1.grContext()); in DEF_GPUTEST()
58 REPORTER_ASSERT(reporter, !info2.grContext()); in DEF_GPUTEST()
59 info1.grContext()->unref(); in DEF_GPUTEST()
[all …]
DVkProtectedContextTest.cpp54 GrContext* grContext() { return fGrContext.get(); } in grContext() function in __anon40f60a930111::VulkanTestHelper
151 GrBackendTexture backendTex = grContext()->createBackendTexture( in createSkSurface()
160 grContext(), backendTex, kTopLeft_GrSurfaceOrigin, 1, in createSkSurface()
184 REPORTER_ASSERT(reporter, protectedTestHelper->grContext() != nullptr); in DEF_GPUTEST()
189 protectedTestHelper->grContext()->createBackendTexture( in DEF_GPUTEST()
198 protectedTestHelper->grContext(), backendTex, kTopLeft_GrSurfaceOrigin, 1, in DEF_GPUTEST()
202 protectedTestHelper->grContext()->deleteBackendTexture(backendTex); in DEF_GPUTEST()
210 REPORTER_ASSERT(reporter, protectedTestHelper->grContext() != nullptr); in DEF_GPUTEST()
215 protectedTestHelper->grContext()->createBackendTexture( in DEF_GPUTEST()
226 REPORTER_ASSERT(reporter, protectedTestHelper->grContext() != nullptr); in DEF_GPUTEST()
[all …]
DSkRemoteGlyphCacheTest.cpp211 auto props = FindSurfaceProps(ctxInfo.grContext()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
213 ctxInfo.grContext()->supportsDistanceFieldText()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
225 SkBitmap expected = RasterBlob(serverBlob, 10, 10, paint, ctxInfo.grContext()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
226 SkBitmap actual = RasterBlob(clientBlob, 10, 10, paint, ctxInfo.grContext()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
250 10, 10, props, &server, ctxInfo.grContext()->supportsDistanceFieldText()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
453 auto props = FindSurfaceProps(ctxInfo.grContext()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
455 10, 10, props, &server, ctxInfo.grContext()->supportsDistanceFieldText()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
467 SkBitmap expected = RasterBlob(serverBlob, 10, 10, paint, ctxInfo.grContext()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
468 SkBitmap actual = RasterBlob(clientBlob, 10, 10, paint, ctxInfo.grContext()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
529 auto props = FindSurfaceProps(ctxInfo.grContext()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
[all …]
DTestTest.cpp27 REPORTER_ASSERT(reporter, ctxInfo.grContext()); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
34 REPORTER_ASSERT(reporter, ctxInfo.grContext()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
41 REPORTER_ASSERT(reporter, ctxInfo.grContext()); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
DSurfaceSemaphoreTest.cpp73 GrContext* childCtx = childInfo.grContext(); in draw_child()
114 GrContext* mainCtx = mainInfo.grContext(); in surface_semaphore_test()
212 if (ctxInfo.grContext()) { in DEF_GPUTEST()
214 factory.getSharedContextInfo(ctxInfo.grContext(), 0); in DEF_GPUTEST()
216 factory.getSharedContextInfo(ctxInfo.grContext(), 1); in DEF_GPUTEST()
217 if (!child1.grContext() || !child2.grContext()) { in DEF_GPUTEST()
228 GrContext* ctx = ctxInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
DTraceMemoryDumpTest.cpp75 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS()
85 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS()
103 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS()
124 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS()
143 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS()
DGrUploadPixelsTests.cpp99 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_SkColorType, GrRenderable::kNo); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
100 basic_texture_test(reporter, ctxInfo.grContext(), kRGBA_8888_SkColorType, GrRenderable::kYes); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
103 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_SkColorType, GrRenderable::kNo); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
104 basic_texture_test(reporter, ctxInfo.grContext(), kBGRA_8888_SkColorType, GrRenderable::kYes); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
DResourceAllocatorTest.cpp134 const GrCaps* caps = ctxInfo.grContext()->priv().caps(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
135 GrProxyProvider* proxyProvider = ctxInfo.grContext()->priv().proxyProvider(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
136 GrResourceProvider* resourceProvider = ctxInfo.grContext()->priv().resourceProvider(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
180 int k2 = ctxInfo.grContext()->priv().caps()->getRenderTargetSampleCount(2, beFormat); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
181 int k4 = ctxInfo.grContext()->priv().caps()->getRenderTargetSampleCount(4, beFormat); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
231 sk_sp<GrSurfaceProxy> p1 = make_backend(ctxInfo.grContext(), t[0].fP1, &backEndTex); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
237 cleanup_backend(ctxInfo.grContext(), backEndTex); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
254 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
304 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
305 GrResourceProvider* resourceProvider = ctxInfo.grContext()->priv().resourceProvider(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
[all …]
DProxyRefTest.cpp62 GrResourceProvider* resourceProvider = ctxInfo.grContext()->priv().resourceProvider(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
67 sk_sp<GrTextureProxy> proxy((*make)(ctxInfo.grContext())); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
84 sk_sp<GrTextureProxy> proxy((*make)(ctxInfo.grContext())); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
105 sk_sp<GrTextureProxy> proxy((*make)(ctxInfo.grContext())); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
DSurfaceTest.cpp89 SkSurface::MakeRenderTarget(ctxInfo.grContext(), SkBudgeted::kNo, info)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
93 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
191 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
264 auto surface(surface_func(ctxInfo.grContext(), kPremul_SkAlphaType, &requestInfo)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
292 auto surface(surface_func(ctxInfo.grContext(), at, nullptr)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
333 auto surface(surface_func(ctxInfo.grContext(), kPremul_SkAlphaType, nullptr)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
337 auto surface(surface_func(ctxInfo.grContext(), kPremul_SkAlphaType, nullptr)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
372 auto surface(surface_func(ctxInfo.grContext(), kPremul_SkAlphaType, nullptr)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
377 auto surface(surface_func(ctxInfo.grContext(), kPremul_SkAlphaType, nullptr)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
447 auto surface(surface_func(ctxInfo.grContext(), kPremul_SkAlphaType, nullptr)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
[all …]
DVkDrawableTest.cpp266 draw_drawable_test(reporter, ctxInfo.grContext(), nullptr); in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
280 if (ctxInfo.grContext()) { in DEF_GPUTEST()
282 factory.getSharedContextInfo(ctxInfo.grContext(), 0); in DEF_GPUTEST()
283 if (!child.grContext()) { in DEF_GPUTEST()
287 draw_drawable_test(reporter, ctxInfo.grContext(), child.grContext()); in DEF_GPUTEST()
DTextBlobCacheTest.cpp160 text_blob_cache_inner(reporter, ctxInfo.grContext(), 1024, 256, 30, true, false); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
164 text_blob_cache_inner(reporter, ctxInfo.grContext(), 256, 256, 10, true, true); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
168 text_blob_cache_inner(reporter, ctxInfo.grContext(), 256, 256, 10, false, false); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
172 text_blob_cache_inner(reporter, ctxInfo.grContext(), 256, 256, 10, false, true); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
DPackedConfigsTextureTest.cpp141 if (ctxInfo.grContext()->colorTypeSupportedAsImage(kARGB_4444_SkColorType)) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
142 run_test(reporter, ctxInfo.grContext(), CONTROL_ARRAY_SIZE, kARGB_4444_SkColorType); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
147 if (ctxInfo.grContext()->colorTypeSupportedAsImage(kRGB_565_SkColorType)) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
148 run_test(reporter, ctxInfo.grContext(), CONTROL_ARRAY_SIZE, kRGB_565_SkColorType); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
DProxyTest.cpp109 GrProxyProvider* proxyProvider = ctxInfo.grContext()->priv().proxyProvider(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
110 GrResourceProvider* resourceProvider = ctxInfo.grContext()->priv().resourceProvider(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
111 const GrCaps& caps = *ctxInfo.grContext()->priv().caps(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
219 GrProxyProvider* proxyProvider = ctxInfo.grContext()->priv().proxyProvider(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
220 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
238 if (ctxInfo.grContext()->colorTypeSupportedAsSurface(colorType)) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
371 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
DImageTest.cpp183 test_encode(reporter, create_gpu_image(ctxInfo.grContext()).get()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
339 sk_sp<SkImage> image(create_gpu_image(ctxInfo.grContext())); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
372 GrContext* context = contextInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
391 sk_sp<SkImage> otherContextImage = create_gpu_image(otherContextInfo.grContext()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
392 otherContextInfo.grContext()->flush(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
449 GrContext* context = contextInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
476 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
510 auto texImage = SkImage::MakeFromBitmap(bmp)->makeTextureImage(ctxInfo.grContext()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
706 image_test_read_pixels(reporter, create_gpu_image(ctxInfo.grContext()).get()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
762 sk_sp<SkImage> image(create_gpu_image(ctxInfo.grContext())); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
[all …]
DTextureStripAtlasManagerTest.cpp21 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
51 GrContext* context = ctxInfo.grContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
/third_party/flutter/skia/docs/examples/
DImage_MakeBackendTextureFromSkImage.cpp6 static sk_sp<SkImage> create_gpu_image(GrContext* grContext) { in create_gpu_image() argument
8 auto surface(SkSurface::MakeRenderTarget(grContext, SkBudgeted::kNo, info)); in create_gpu_image()
18 GrContext* grContext = canvas->getGrContext(); in draw() local
19 if (!grContext) { in draw()
22 sk_sp<SkImage> backEndImage = create_gpu_image(grContext); in draw()
26 if (!SkImage::MakeBackendTextureFromSkImage(grContext, std::move(backEndImage), in draw()
30 sk_sp<SkImage> i2 = SkImage::MakeFromTexture(grContext, texture, kTopLeft_GrSurfaceOrigin, in draw()
DImage_getBackendTexture.cpp8 GrContext* grContext = canvas->getGrContext();
9 if (!grContext) {
13 sk_sp<SkImage> imageFromBackend = SkImage::MakeFromAdoptedTexture(grContext, backEndTexture,
19 sk_sp<SkImage> imageFromTexture = SkImage::MakeFromAdoptedTexture(grContext, textureFromImage,
/third_party/flutter/skia/src/atlastext/
DSkAtlasTextTarget.cpp91 fOpMemoryPool = fContext->internal().grContext()->priv().refOpMemoryPool(); in SkInternalAtlasTextTarget()
113 return this->context()->internal().grContext(); in getContext()
158 auto grContext = this->context()->internal().grContext(); in drawText() local
159 auto atlasTextContext = grContext->priv().drawingManager()->getTextContext(); in drawText()
166 atlasTextContext->drawGlyphRunList(grContext, this, GrNoClip(), this->ctm(), props, in drawText()
177 const GrCaps& caps = *this->context()->internal().grContext()->priv().caps(); in addDrawOp()
225 auto glyphCache = context.grContext()->priv().getGrStrikeCache(); in executeForTextTarget()
226 auto atlasManager = context.grContext()->priv().getAtlasManager(); in executeForTextTarget()
227 auto resourceProvider = context.grContext()->priv().resourceProvider(); in executeForTextTarget()
/third_party/flutter/skia/platform_tools/android/apps/skottie/src/main/cpp/
Dnative-lib.cpp72 sk_sp<GrContext> grContext = GrContext::MakeGL(std::move(glInterface), options); in Java_org_skia_skottie_SkottieRunner_nCreateProxy() local
73 if (!grContext.get()) { in Java_org_skia_skottie_SkottieRunner_nCreateProxy()
78 skottie->mGrContext = grContext; in Java_org_skia_skottie_SkottieRunner_nCreateProxy()
162 auto grContext = skottieAnimation->mRunner->mGrContext; in Java_org_skia_skottie_SkottieRunner_00024SkottieAnimationImpl_nDrawFrame() local
164 if (!grContext) { in Java_org_skia_skottie_SkottieRunner_00024SkottieAnimationImpl_nDrawFrame()
184 grContext.get(), backendRT, kBottomLeft_GrSurfaceOrigin, colorType, in Java_org_skia_skottie_SkottieRunner_00024SkottieAnimationImpl_nDrawFrame()
/third_party/flutter/skia/samplecode/
DSampleChineseFling.cpp140 GrContext* grContext = canvas->getGrContext(); in onDrawContent() local
141 if (grContext) { in onDrawContent()
142 sk_sp<SkImage> image = grContext->priv().testingOnly_getFontAtlasImage( in onDrawContent()
146 image = grContext->priv().testingOnly_getFontAtlasImage( in onDrawContent()
150 image = grContext->priv().testingOnly_getFontAtlasImage( in onDrawContent()
154 image = grContext->priv().testingOnly_getFontAtlasImage( in onDrawContent()
DSampleAnimatedText.cpp70 GrContext* grContext = canvas->getGrContext(); in onDrawContent() local
71 if (grContext) { in onDrawContent()
72 sk_sp<SkImage> image = grContext->priv().testingOnly_getFontAtlasImage( in onDrawContent()
/third_party/flutter/skia/experimental/wasm-skp-debugger/
Ddebugger_bindings.cpp248 sk_sp<GrContext> grContext(GrContext::MakeGL(interface)); in MakeGrContext() local
249 return grContext; in MakeGrContext()
252 sk_sp<SkSurface> MakeOnScreenGLSurface(sk_sp<GrContext> grContext, int width, int height) { in MakeOnScreenGLSurface() argument
271 sk_sp<SkSurface> surface(SkSurface::MakeFromBackendRenderTarget(grContext.get(), target, in MakeOnScreenGLSurface()
277 sk_sp<SkSurface> MakeRenderTarget(sk_sp<GrContext> grContext, int width, int height) { in MakeRenderTarget() argument
280 sk_sp<SkSurface> surface(SkSurface::MakeRenderTarget(grContext.get(), in MakeRenderTarget()
288 sk_sp<SkSurface> MakeRenderTarget(sk_sp<GrContext> grContext, SimpleImageInfo sii) { in MakeRenderTarget() argument
289 sk_sp<SkSurface> surface(SkSurface::MakeRenderTarget(grContext.get(), in MakeRenderTarget()
/third_party/flutter/skia/tools/gpu/
DGrContextFactory.h170 GrContext* grContext() const { return fGrContext; } in grContext() function
182 ContextInfo(GrContextFactory::ContextType type, TestContext* testContext, GrContext* grContext, in ContextInfo() argument
184 : fType(type), fTestContext(testContext), fGrContext(grContext), fOptions(options) {} in ContextInfo()
/third_party/skia/experimental/skottiekit/
Dskottiekit_bindings.cpp229 sk_sp<SkSurface> MakeOnScreenGLSurface(sk_sp<GrDirectContext> grContext, int width, int height) { in MakeOnScreenGLSurface() argument
251 sk_sp<SkSurface> surface(SkSurface::MakeFromBackendRenderTarget(grContext.get(), target, in MakeOnScreenGLSurface()
257 sk_sp<SkSurface> MakeRenderTarget(sk_sp<GrDirectContext> grContext, int width, int height) { in MakeRenderTarget() argument
260 sk_sp<SkSurface> surface(SkSurface::MakeRenderTarget(grContext.get(), in MakeRenderTarget()
268 sk_sp<SkSurface> MakeRenderTarget(sk_sp<GrDirectContext> grContext, SimpleImageInfo sii) { in MakeRenderTarget() argument
269 sk_sp<SkSurface> surface(SkSurface::MakeRenderTarget(grContext.get(), in MakeRenderTarget()

12345