Lines Matching defs:context
39 SurfaceContext::SurfaceContext(GrRecordingContext* context,
42 : fContext(context), fReadView(std::move(readView)), fColorInfo(info) {
43 SkASSERT(!context->abandoned());
132 // tests, it is possible that during that call we have abandoned the context. Thus, we do
389 // tests, it is possible that during that call we have abanoned the context. Thus we do an
434 // In the fast path we always write the srcData to the temp context as though it were RGBA.
767 const auto* context = reinterpret_cast<const FinishContext*>(c);
768 auto manager = context->fMappedBufferManager;
771 SkAlignTo(context->fSize.width() * SkColorTypeBytesPerPixel(context->fColorType),
772 context->fBufferAlignment);
773 if (!result->addTransferResult(context->fTransferResult, context->fSize, rowBytes,
777 (*context->fClientCallback)(context->fClientContext, std::move(result));
778 delete context;
1001 const auto* context = reinterpret_cast<const FinishContext*>(c);
1002 auto manager = context->fMappedBufferManager;
1004 size_t rowBytes = SkToSizeT(context->fSize.width());
1005 rowBytes = SkAlignTo(rowBytes, context->fBufferAlignment);
1006 if (!result->addTransferResult(context->fYTransfer, context->fSize, rowBytes, manager)) {
1007 (*context->fClientCallback)(context->fClientContext, nullptr);
1008 delete context;
1011 rowBytes = SkToSizeT(context->fSize.width()) / 2;
1012 rowBytes = SkAlignTo(rowBytes, context->fBufferAlignment);
1013 SkISize uvSize = {context->fSize.width() / 2, context->fSize.height() / 2};
1014 if (!result->addTransferResult(context->fUTransfer, uvSize, rowBytes, manager)) {
1015 (*context->fClientCallback)(context->fClientContext, nullptr);
1016 delete context;
1019 if (!result->addTransferResult(context->fVTransfer, uvSize, rowBytes, manager)) {
1020 (*context->fClientCallback)(context->fClientContext, nullptr);
1021 delete context;
1024 (*context->fClientCallback)(context->fClientContext, std::move(result));
1025 delete context;