本文整理汇总了C++中GrTexture::getTextureHandle方法的典型用法代码示例。如果您正苦于以下问题:C++ GrTexture::getTextureHandle方法的具体用法?C++ GrTexture::getTextureHandle怎么用?C++ GrTexture::getTextureHandle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GrTexture
的用法示例。
在下文中一共展示了GrTexture::getTextureHandle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getSkBitmapTextureId
inline static int getSkBitmapTextureId(const SkBitmap& bitmap, int fallback)
{
if (!bitmap.getTexture())
return fallback;
GrTexture* texture = reinterpret_cast<GrTexture*>(bitmap.getTexture());
return texture->getTextureHandle();
}
示例2: getBackingTexture
Platform3DObject WebGLImageBufferSurface::getBackingTexture() const
{
GrTexture* texture = m_bitmap.getTexture();
if (!texture)
return 0;
return texture->getTextureHandle();
}
示例3: onGetTextureHandle
GrBackendObject SkSurface_Gpu::onGetTextureHandle(BackendHandleAccess access) {
GrRenderTarget* rt = prepare_rt_for_external_access(this, access);
GrTexture* texture = rt->asTexture();
if (texture) {
return texture->getTextureHandle();
}
return 0;
}
示例4: getTextureHandle
GrBackendObject SkImage::getTextureHandle(bool flushPendingGrContextIO) const {
GrTexture* texture = as_IB(this)->getTexture();
if (texture) {
GrContext* context = texture->getContext();
if (context) {
if (flushPendingGrContextIO) {
context->prepareSurfaceForExternalIO(texture);
}
}
return texture->getTextureHandle();
}
return 0;
}
示例5: ENABLE
unsigned Canvas2DLayerBridge::prepareTexture(WebTextureUpdater& updater)
{
#if ENABLE(CANVAS_USES_MAILBOX)
ASSERT_NOT_REACHED();
return 0;
#else
m_context->makeContextCurrent();
TRACE_EVENT0("cc", "Canvas2DLayerBridge::SkCanvas::flush");
m_canvas->flush();
m_context->flush();
// Notify skia that the state of the backing store texture object will be touched by the compositor
GrRenderTarget* renderTarget = reinterpret_cast<GrRenderTarget*>(m_canvas->getDevice()->accessRenderTarget());
if (renderTarget) {
GrTexture* texture = renderTarget->asTexture();
texture->invalidateCachedState();
return texture->getTextureHandle();
}
return 0;
#endif // !ENABLE(CANVAS_USES_MAILBOX)
}