本文整理汇总了C++中SurfacePtr::resize方法的典型用法代码示例。如果您正苦于以下问题:C++ SurfacePtr::resize方法的具体用法?C++ SurfacePtr::resize怎么用?C++ SurfacePtr::resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SurfacePtr
的用法示例。
在下文中一共展示了SurfacePtr::resize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createPicture
bool VaapiDecoderVP8::allocNewPicture()
{
m_currentPicture = createPicture(m_currentPTS);
if (!m_currentPicture)
return false;
SurfacePtr surface = m_currentPicture->getSurface();
ASSERT(m_frameWidth && m_frameHeight);
if (!surface->resize(m_frameWidth, m_frameHeight)) {
ASSERT(0 && "frame size is bigger than internal surface resolution");
return false;
}
DEBUG ("alloc new picture: %p with surface ID: %x",
m_currentPicture.get(), m_currentPicture->getSurfaceID());
return true;
}
示例2: initSurfDesc
SurfacePtr Video::initSurfDesc(int16 width, int16 height, int16 flags) {
SurfacePtr descPtr;
if (flags & PRIMARY_SURFACE)
assert((width == _surfWidth) && (height == _surfHeight));
if (flags & PRIMARY_SURFACE) {
_vm->_global->_primaryWidth = width;
_vm->_global->_primaryHeight = height;
descPtr = _vm->_global->_primarySurfDesc;
descPtr->resize(width, height);
} else {
assert(!(flags & DISABLE_SPR_ALLOC));
if (!(flags & SCUMMVM_CURSOR))
width = (width + 7) & 0xFFF8;
descPtr = SurfacePtr(new Surface(width, height, _vm->getPixelFormat().bytesPerPixel));
}
return descPtr;
}