本文整理汇总了C++中gfxMatrix::PreservesAxisAlignedRectangles方法的典型用法代码示例。如果您正苦于以下问题:C++ gfxMatrix::PreservesAxisAlignedRectangles方法的具体用法?C++ gfxMatrix::PreservesAxisAlignedRectangles怎么用?C++ gfxMatrix::PreservesAxisAlignedRectangles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gfxMatrix
的用法示例。
在下文中一共展示了gfxMatrix::PreservesAxisAlignedRectangles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
LayerManagerOGL::SetWorldTransform(const gfxMatrix& aMatrix)
{
NS_ASSERTION(aMatrix.PreservesAxisAlignedRectangles(),
"SetWorldTransform only accepts matrices that satisfy PreservesAxisAlignedRectangles");
NS_ASSERTION(!aMatrix.HasNonIntegerScale(),
"SetWorldTransform only accepts matrices with integer scale");
mWorldMatrix = aMatrix;
}
示例2: LOGD
bool
HwcComposer2D::TryRender(Layer* aRoot,
const gfxMatrix& aGLWorldTransform)
{
if (!aGLWorldTransform.PreservesAxisAlignedRectangles()) {
LOGD("Render aborted. World transform has non-square angle rotation");
return false;
}
MOZ_ASSERT(Initialized());
if (mList) {
mList->numHwLayers = 0;
mHwcLayerMap.Clear();
}
if (mPrepared) {
Reset();
}
// XXX: The clear() below means all rect vectors will be have to be
// reallocated. We may want to avoid this if possible
mVisibleRegions.clear();
MOZ_ASSERT(mHwcLayerMap.IsEmpty());
if (!PrepareLayerList(aRoot,
mScreenRect,
gfxMatrix(),
aGLWorldTransform))
{
LOGD("Render aborted. Nothing was drawn to the screen");
return false;
}
if (!TryHwComposition()) {
LOGD("H/W Composition failed");
return false;
}
LOGD("Frame rendered");
return true;
}