本文整理汇总了C++中GrBackendTexture::getMockTextureInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ GrBackendTexture::getMockTextureInfo方法的具体用法?C++ GrBackendTexture::getMockTextureInfo怎么用?C++ GrBackendTexture::getMockTextureInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GrBackendTexture
的用法示例。
在下文中一共展示了GrBackendTexture::getMockTextureInfo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deleteBackendTexture
void GrMockGpu::deleteBackendTexture(const GrBackendTexture& tex) {
SkASSERT(GrBackendApi::kMock == tex.backend());
GrMockTextureInfo info;
if (tex.getMockTextureInfo(&info)) {
fOutstandingTestingOnlyTextureIDs.remove(info.fID);
}
}
示例2: isTestingOnlyBackendTexture
bool GrMockGpu::isTestingOnlyBackendTexture(const GrBackendTexture& tex) const {
SkASSERT(GrBackendApi::kMock == tex.backend());
GrMockTextureInfo info;
if (!tex.getMockTextureInfo(&info)) {
return false;
}
return fOutstandingTestingOnlyTextureIDs.contains(info.fID);
}
示例3: SkAssertResult
sk_sp<GrTexture> GrMockGpu::onWrapBackendTexture(const GrBackendTexture& tex,
GrWrapOwnership ownership,
GrWrapCacheable wrapType, GrIOType ioType) {
GrSurfaceDesc desc;
desc.fWidth = tex.width();
desc.fHeight = tex.height();
GrMockTextureInfo info;
SkAssertResult(tex.getMockTextureInfo(&info));
desc.fConfig = info.fConfig;
GrMipMapsStatus mipMapsStatus = tex.hasMipMaps() ? GrMipMapsStatus::kValid
: GrMipMapsStatus::kNotAllocated;
return sk_sp<GrTexture>(new GrMockTexture(this, desc, mipMapsStatus, info, wrapType, ioType));
}
示例4: GrMockRenderTarget
sk_sp<GrRenderTarget> GrMockGpu::onWrapBackendTextureAsRenderTarget(const GrBackendTexture& tex,
int sampleCnt) {
GrSurfaceDesc desc;
desc.fFlags = kRenderTarget_GrSurfaceFlag;
desc.fWidth = tex.width();
desc.fHeight = tex.height();
GrMockTextureInfo texInfo;
SkAssertResult(tex.getMockTextureInfo(&texInfo));
desc.fConfig = texInfo.fConfig;
desc.fSampleCnt = sampleCnt;
GrMockRenderTargetInfo rtInfo;
rtInfo.fConfig = texInfo.fConfig;
// The client gave us the texture ID but we supply the render target ID.
rtInfo.fID = NextInternalRenderTargetID();
return sk_sp<GrRenderTarget>(
new GrMockRenderTarget(this, GrMockRenderTarget::kWrapped, desc, rtInfo));
}
示例5: GrMockTextureRenderTarget
sk_sp<GrTexture> GrMockGpu::onWrapRenderableBackendTexture(const GrBackendTexture& tex,
int sampleCnt,
GrWrapOwnership ownership) {
GrSurfaceDesc desc;
desc.fFlags = kRenderTarget_GrSurfaceFlag;
desc.fWidth = tex.width();
desc.fHeight = tex.height();
GrMockTextureInfo texInfo;
SkAssertResult(tex.getMockTextureInfo(&texInfo));
desc.fConfig = texInfo.fConfig;
GrMipMapsStatus mipMapsStatus =
tex.hasMipMaps() ? GrMipMapsStatus::kValid : GrMipMapsStatus::kNotAllocated;
GrMockRenderTargetInfo rtInfo;
rtInfo.fConfig = texInfo.fConfig;
// The client gave us the texture ID but we supply the render target ID.
rtInfo.fID = NextInternalRenderTargetID();
return sk_sp<GrTexture>(
new GrMockTextureRenderTarget(this, desc, mipMapsStatus, texInfo, rtInfo));
}