Home
last modified time | relevance | path

Searched refs:rContext (Results 1 – 25 of 83) sorted by relevance

1234

/external/skia/src/image/
DSkImage.cpp221 bool SkImage::isValid(GrRecordingContext* rContext) const { in isValid()
222 if (rContext && rContext->abandoned()) { in isValid()
225 return as_IB(this)->onIsValid(rContext); in isValid()
246 bool SkImage::isValid(GrRecordingContext* rContext) const { in isValid()
247 if (rContext) { in isValid()
325 GrRecordingContext* rContext, in asFragmentProcessor() argument
331 if (!rContext) { in asFragmentProcessor()
338 (!rContext->priv().caps()->mipmapSupport() || this->dimensions().area() <= 1)) { in asFragmentProcessor()
341 return this->onAsFragmentProcessor(rContext, sampling, tileModes, m, subset, domain); in asFragmentProcessor()
345 GrRecordingContext* rContext, in MakeFragmentProcessorFromView() argument
[all …]
DSkImage_Raster.cpp205 bool SkImage_Raster::onPinAsTexture(GrRecordingContext* rContext) const { in onPinAsTexture()
209 if (rContext->priv().contextID() != fPinnedContextID) { in onPinAsTexture()
215 std::tie(fPinnedView, fPinnedColorType) = GrMakeCachedBitmapProxyView(rContext, in onPinAsTexture()
223 fPinnedContextID = rContext->priv().contextID(); in onPinAsTexture()
230 void SkImage_Raster::onUnpinAsTexture(GrRecordingContext* rContext) const { in onUnpinAsTexture()
235 if (rContext->priv().contextID() != fPinnedContextID) { in onUnpinAsTexture()
248 bool SkImage_Raster::isPinnedOnContext(GrRecordingContext* rContext) const { in isPinnedOnContext()
249 return fPinnedContextID == rContext->priv().contextID(); in isPinnedOnContext()
417 GrRecordingContext* rContext, in onAsView() argument
422 return {CopyView(rContext, fPinnedView, mipmapped, policy), fPinnedColorType}; in onAsView()
[all …]
DSkSurface_GpuMtl.mm29 sk_sp<SkSurface> SkSurface::MakeFromCAMetalLayer(GrRecordingContext* rContext,
37 GrProxyProvider* proxyProvider = rContext->priv().proxyProvider();
38 const GrCaps* caps = rContext->priv().caps();
93 auto rtc = std::make_unique<GrSurfaceDrawContext>(rContext, std::move(readView),
97 sk_sp<SkSurface> surface = SkSurface_Gpu::MakeWrappedRenderTarget(rContext, std::move(rtc));
101 sk_sp<SkSurface> SkSurface::MakeFromMTKView(GrRecordingContext* rContext,
108 GrProxyProvider* proxyProvider = rContext->priv().proxyProvider();
109 const GrCaps* caps = rContext->priv().caps();
163 auto rtc = std::make_unique<GrSurfaceDrawContext>(rContext, std::move(readView),
167 sk_sp<SkSurface> surface = SkSurface_Gpu::MakeWrappedRenderTarget(rContext, std::move(rtc));
DSkImage_Gpu.cpp187 sk_sp<SkImage> SkImage_Gpu::MakeWithVolatileSrc(sk_sp<GrRecordingContext> rContext, in MakeWithVolatileSrc() argument
190 SkASSERT(rContext); in MakeWithVolatileSrc()
195 auto copy = GrSurfaceProxy::Copy(rContext.get(), in MakeWithVolatileSrc()
208 if (auto direct = sk_ref_sp(rContext->asDirectContext())) { in MakeWithVolatileSrc()
218 return sk_make_sp<SkImage_Gpu>(std::move(rContext), in MakeWithVolatileSrc()
389 static sk_sp<SkImage> new_wrapped_texture_common(GrRecordingContext* rContext, in new_wrapped_texture_common() argument
401 GrProxyProvider* proxyProvider = rContext->priv().proxyProvider(); in new_wrapped_texture_common()
408 GrSwizzle swizzle = rContext->priv().caps()->getReadSwizzle(proxy->backendFormat(), colorType); in new_wrapped_texture_common()
411 return sk_make_sp<SkImage_Gpu>(sk_ref_sp(rContext), in new_wrapped_texture_common()
417 sk_sp<SkImage> SkImage::MakeFromCompressedTexture(GrRecordingContext* rContext, in MakeFromCompressedTexture() argument
[all …]
DSkImage_Lazy.cpp258 GrRecordingContext* rContext, in onAsFragmentProcessor() argument
267 return MakeFragmentProcessorFromView(rContext, in onAsFragmentProcessor()
268 std::get<0>(this->asView(rContext, mm)), in onAsFragmentProcessor()
409 GrSurfaceProxyView SkImage_Lazy::lockTextureProxyView(GrRecordingContext* rContext, in lockTextureProxyView() argument
430 const GrCaps* caps = rContext->priv().caps(); in lockTextureProxyView()
431 GrProxyProvider* proxyProvider = rContext->priv().proxyProvider(); in lockTextureProxyView()
436 auto listener = GrMakeUniqueKeyInvalidationListener(&key, rContext->priv().contextID()); in lockTextureProxyView()
457 auto mippedView = GrCopyBaseMipMapToView(rContext, view); in lockTextureProxyView()
474 if (auto view = generator->generateTexture(rContext, in lockTextureProxyView()
486 if (mipmapped == GrMipmapped::kNo && !rContext->priv().options().fDisableGpuYUVConversion) { in lockTextureProxyView()
[all …]
/external/skia/gm/
Dyuv420_odd_dim.cpp25 static sk_sp<SkImage> make_image(GrRecordingContext* rContext) { in make_image() argument
49 return imageHelper->refImage(rContext, sk_gpu_test::LazyYUVImage::Type::kFromPixmaps); in make_image()
56 auto rContext = canvas->recordingContext(); variable
57 if (!rContext) {
61 auto image = make_image(rContext);
63 return rContext->abandoned() ? skiagm::DrawResult::kOk : skiagm::DrawResult::kFail;
Dducky_yuv_blend.cpp30 if (auto* rContext = canvas->recordingContext(); rContext && !rContext->abandoned()) { variable
34 duckyFG[1] = lazyYUV->refImage(rContext, sk_gpu_test::LazyYUVImage::Type::kFromPixmaps);
Dvideo_decoder.cpp37 auto* rContext = canvas->recordingContext(); in onDraw() local
38 if (!rContext) { in onDraw()
42 fDecoder.setGrContext(rContext); // context can change over time in viewer in onDraw()
Dpath_stroke_with_zero_length.cpp134 auto rContext = canvas->recordingContext(); in draw_zero_length_capped_paths() local
135 auto dContext = GrAsDirectContext(rContext); in draw_zero_length_capped_paths()
137 if (!dContext && rContext) { in draw_zero_length_capped_paths()
206 auto rContext = canvas->recordingContext(); in draw_zero_length_capped_paths_dbl_contour() local
207 auto dContext = GrAsDirectContext(rContext); in draw_zero_length_capped_paths_dbl_contour()
209 if (!dContext && rContext) { in draw_zero_length_capped_paths_dbl_contour()
Dimage_pict.cpp166 TextureGenerator(GrRecordingContext* rContext, const SkImageInfo& info, sk_sp<SkPicture> pic) in TextureGenerator() argument
168 , fRContext(SkRef(rContext)) { in TextureGenerator()
170 sk_sp<SkSurface> surface(SkSurface::MakeRenderTarget(rContext, SkBudgeted::kYes, info, 0, in TextureGenerator()
177 std::tie(fView, std::ignore) = as_IB(image)->asView(rContext, GrMipmapped::kNo); in TextureGenerator()
181 GrSurfaceProxyView onGenerateTexture(GrRecordingContext* rContext, in onGenerateTexture() argument
186 SkASSERT(rContext); in onGenerateTexture()
187 SkASSERT(rContext->priv().matches(fRContext.get())); in onGenerateTexture()
Dpreservefillrule.cpp52 DrawResult onDraw(GrRecordingContext* rContext, GrSurfaceDrawContext* rtc, SkCanvas* canvas, in onDraw() argument
59 auto* ccpr = rContext->priv().drawingManager()->getCoverageCountingPathRenderer(); in onDraw()
65 auto dContext = GrAsDirectContext(rContext); in onDraw()
Dgpu_blur_utils.cpp122 GrSurfaceProxyView make_src_image(GrRecordingContext* rContext, in make_src_image() argument
126 auto surf = SkSurface::MakeRenderTarget(rContext, SkBudgeted::kYes, srcII); in make_src_image()
172 auto [src, ct] = as_IB(img)->asView(rContext, GrMipmapped::kNo); in make_src_image()
176 static void run(GrRecordingContext* rContext, GrSurfaceDrawContext* sdc, bool subsetSrc, bool ref) { in run() argument
177 GrSurfaceProxyView src = make_src_image(rContext, {60, 60}); in run()
238 const auto& caps = *rContext->priv().caps(); in run()
270 if (auto blurView = blurFn(rContext, in run()
351 GrRecordingContext* rContext, in do_very_large_blur_gm() argument
372 GrSurfaceProxyView result = b(rContext, src, dstB, srcB, sigX, sigY, tm); in do_very_large_blur_gm()
Dimagemakewithfilter.cpp275 auto rContext = canvas->recordingContext(); in onDraw() local
277 auto dContext = GrAsDirectContext(rContext); in onDraw()
278 if (rContext) { in onDraw()
296 SkASSERT(mainImage && (mainImage->isTextureBacked() || !rContext)); in onDraw()
297 SkASSERT(auxImage && (auxImage->isTextureBacked() || !rContext)); in onDraw()
382 auto rContext = canvas->recordingContext(); in drawImageWithFilter() local
383 result = mainImage->makeWithFilter(rContext, filter.get(), subset, clip, in drawImageWithFilter()
/external/skia/tools/gpu/
DProxyUtils.cpp28 GrTextureProxy* GetTextureImageProxy(SkImage* image, GrRecordingContext* rContext) { in GetTextureImageProxy() argument
32 if (!rContext) { in GetTextureImageProxy()
36 rContext = iContext->priv().asRecordingContext(); in GetTextureImageProxy()
37 if (!rContext) { in GetTextureImageProxy()
41 auto [view, ct] = as_IB(image)->asView(rContext, GrMipmapped::kNo); in GetTextureImageProxy()
44 SkASSERT(!image->isValid(rContext)); in GetTextureImageProxy()
DYUVUtils.cpp159 sk_sp<SkImage> LazyYUVImage::refImage(GrRecordingContext* rContext, Type type) { in refImage() argument
160 if (this->ensureYUVImage(rContext, type)) { in refImage()
210 bool LazyYUVImage::ensureYUVImage(GrRecordingContext* rContext, Type type) { in ensureYUVImage() argument
213 if (fYUVImage[idx] && fYUVImage[idx]->isValid(rContext)) { in ensureYUVImage()
219 if (!rContext || rContext->abandoned()) { in ensureYUVImage()
222 fYUVImage[idx] = SkImage::MakeFromYUVAPixmaps(rContext, in ensureYUVImage()
235 if (!rContext || rContext->abandoned()) { in ensureYUVImage()
244 if (auto direct = rContext->asDirectContext()) { in ensureYUVImage()
DYUVUtils.h38 sk_sp<SkImage> refImage(GrRecordingContext* rContext, Type);
56 bool ensureYUVImage(GrRecordingContext* rContext, Type type);
/external/skia/tests/
DProxyRefTest.cpp25 static sk_sp<GrTextureProxy> make_deferred(GrRecordingContext* rContext) { in make_deferred() argument
26 GrProxyProvider* proxyProvider = rContext->priv().proxyProvider(); in make_deferred()
27 const GrCaps* caps = rContext->priv().caps(); in make_deferred()
36 static sk_sp<GrTextureProxy> make_wrapped(GrRecordingContext* rContext) { in make_wrapped() argument
37 GrProxyProvider* proxyProvider = rContext->priv().proxyProvider(); in make_wrapped()
DImageNewShaderTest.cpp106 static void gpu_to_gpu(skiatest::Reporter* reporter, GrRecordingContext* rContext) { in gpu_to_gpu() argument
109 auto sourceSurface(SkSurface::MakeRenderTarget(rContext, SkBudgeted::kNo, info)); in gpu_to_gpu()
110 auto destinationSurface(SkSurface::MakeRenderTarget(rContext, SkBudgeted::kNo, info)); in gpu_to_gpu()
115 static void raster_to_gpu(skiatest::Reporter* reporter, GrRecordingContext* rContext) { in raster_to_gpu() argument
119 auto destinationSurface(SkSurface::MakeRenderTarget(rContext, SkBudgeted::kNo, info)); in raster_to_gpu()
DPinnedImageTest.cpp39 static void basic_test(skiatest::Reporter* reporter, GrRecordingContext* rContext) { in basic_test() argument
51 sk_sp<SkSurface> gpuSurface = SkSurface::MakeRenderTarget(rContext, SkBudgeted::kYes, ii); in basic_test()
67 SkImage_pinAsTexture(img.get(), rContext); // pin at blue in basic_test()
77 SkImage_unpinAsTexture(img.get(), rContext); in basic_test()
DGrThreadSafeCacheTest.cpp39 static std::unique_ptr<GrSurfaceDrawContext> new_RTC(GrRecordingContext* rContext, int wh) { in new_RTC() argument
40 return GrSurfaceDrawContext::Make(rContext, in new_RTC()
181 auto rContext = canvas->recordingContext(); in addViewAccess() local
183 auto view = AccessCachedView(rContext, this->threadSafeCache(), in addViewAccess()
246 GrRecordingContext* rContext = canvas->recordingContext(); in checkView() local
247 GrProxyProvider* recordingProxyProvider = rContext->priv().proxyProvider(); in checkView()
418 static GrOp::Owner Make(GrRecordingContext* rContext, TestHelper::Stats* stats, in Make() argument
423 rContext, rContext, stats, wh, id, failLookup, failFillingIn, isNewerBetter); in Make()
431 GrThreadSafeVertexTestOp(GrRecordingContext* rContext, TestHelper::Stats* stats, int wh, int id, in GrThreadSafeVertexTestOp() argument
445 this->findOrCreateVertices(rContext, failLookup, fFailFillingIn); in GrThreadSafeVertexTestOp()
[all …]
DPathRendererCacheTests.cpp33 static void draw_path(GrRecordingContext* rContext, in draw_path() argument
51 GrPathRenderer::DrawPathArgs args{rContext, in draw_path()
157 auto createPR = [](GrRecordingContext* rContext) { in __anon4448c3ad0202() argument
158 return new GrSoftwarePathRenderer(rContext->priv().proxyProvider(), true); in __anon4448c3ad0202()
/external/skia/src/gpu/tessellate/
DGrTessellationPathRenderer.cpp45 GrTessellationPathRenderer::GrTessellationPathRenderer(GrRecordingContext* rContext) in GrTessellationPathRenderer() argument
47 std::min(kMaxAtlasSize, rContext->priv().caps()->maxPreferredRenderTargetSize()), in GrTessellationPathRenderer()
48 *rContext->priv().caps(), kAtlasAlgorithm) { in GrTessellationPathRenderer()
49 this->initAtlasFlags(rContext); in GrTessellationPathRenderer()
52 void GrTessellationPathRenderer::initAtlasFlags(GrRecordingContext* rContext) { in initAtlasFlags() argument
55 if (!rContext->asDirectContext()) { in initAtlasFlags()
60 const GrCaps& caps = *rContext->priv().caps(); in initAtlasFlags()
103 rContext->priv().printWarningMessage(SkStringPrintf( in initAtlasFlags()
152 static GrOp::Owner make_op(GrRecordingContext* rContext, const GrSurfaceContext* surfaceContext, in make_op() argument
161 const GrShaderCaps& shaderCaps = *rContext->priv().caps()->shaderCaps(); in make_op()
[all …]
/external/skia/bench/
DSKPBench.cpp171 bool SKPBench::getDMSAAStats(GrRecordingContext* rContext) { in getDMSAAStats() argument
172 if (!rContext || !rContext->asDirectContext()) { in getDMSAAStats()
177 rContext->asDirectContext()->flushAndSubmit(); in getDMSAAStats()
178 rContext->priv().dmsaaStats() = {}; in getDMSAAStats()
180 rContext->asDirectContext()->flush(); in getDMSAAStats()
/external/skia/tools/skottie_ios_app/
DSkMetalViewBridge.mm15 sk_sp<SkSurface> SkMtkViewToSurface(MTKView* mtkView, GrRecordingContext* rContext) {
16 if (!rContext ||
28 return SkSurface::MakeFromMTKView(rContext, (__bridge GrMTLHandle)mtkView, origin, sampleCount,
/external/skia/experimental/ffmpeg/
DSkVideoDecoder.h27 void setGrContext(GrRecordingContext* rContext) { fRecordingContext = rContext; } in setGrContext() argument

1234