Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
DDLPromiseImageHelper.cpp File Reference
#include "tools/DDLPromiseImageHelper.h"
#include "include/core/SkPicture.h"
#include "include/core/SkSerialProcs.h"
#include "include/gpu/GrContextThreadSafeProxy.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/GrYUVABackendTextures.h"
#include "include/gpu/ganesh/SkImageGanesh.h"
#include "include/private/chromium/SkImageChromium.h"
#include "src/codec/SkCodecImageGenerator.h"
#include "src/core/SkCachedData.h"
#include "src/core/SkMipmap.h"
#include "src/core/SkTaskGroup.h"
#include "src/gpu/ganesh/GrCaps.h"
#include "src/gpu/ganesh/GrDirectContextPriv.h"
#include "src/gpu/ganesh/image/SkImage_GaneshYUVA.h"
#include "src/image/SkImage_Base.h"

Go to the source code of this file.

Functions

static GrBackendTexture create_yuva_texture (GrDirectContext *direct, const SkPixmap &pm, int texIndex)
 

Function Documentation

◆ create_yuva_texture()

static GrBackendTexture create_yuva_texture ( GrDirectContext direct,
const SkPixmap pm,
int  texIndex 
)
static

Definition at line 124 of file DDLPromiseImageHelper.cpp.

126 {
127 SkASSERT(texIndex >= 0 && texIndex <= 3);
128
129 bool finishedBECreate = false;
130 auto markFinished = [](void* context) {
131 *(bool*)context = true;
132 };
133 auto beTex = direct->createBackendTexture(pm,
135 GrRenderable::kNo,
136 GrProtected::kNo,
137 markFinished,
138 &finishedBECreate,
139 /*label=*/"CreateYuvaTexture");
140 if (beTex.isValid()) {
141 direct->submit();
142 while (!finishedBECreate) {
143 direct->checkAsyncWorkCompletion();
144 }
145 }
146 return beTex;
147}
@ kTopLeft_GrSurfaceOrigin
Definition GrTypes.h:148
#define SkASSERT(cond)
Definition SkAssert.h:116
bool submit(GrSyncCpu sync=GrSyncCpu::kNo)
GrBackendTexture createBackendTexture(int width, int height, const GrBackendFormat &, skgpu::Mipmapped, GrRenderable, GrProtected=GrProtected::kNo, std::string_view label={})