本文整理汇总了C++中LayerAndroid::evaluateAnimations方法的典型用法代码示例。如果您正苦于以下问题:C++ LayerAndroid::evaluateAnimations方法的具体用法?C++ LayerAndroid::evaluateAnimations怎么用?C++ LayerAndroid::evaluateAnimations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayerAndroid
的用法示例。
在下文中一共展示了LayerAndroid::evaluateAnimations方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawGL
bool TreeManager::drawGL(double currentTime, IntRect& viewRect,
SkRect& visibleRect, float scale,
bool enterFastSwapMode, bool* treesSwappedPtr, bool* newTreeHasAnimPtr,
TexturesResult* texturesResultPtr)
{
m_fastSwapMode |= enterFastSwapMode;
XLOG("drawGL, D %p, P %p, Q %p, fastSwap %d",
m_drawingTree, m_paintingTree, m_queuedTree, m_fastSwapMode);
bool ret = false;
bool didTreeSwap = false;
if (m_paintingTree) {
XLOG("preparing painting tree %p", m_paintingTree);
LayerAndroid* laTree = 0;
if (m_paintingTree->countChildren()) {
laTree = static_cast<LayerAndroid*>(m_paintingTree->getChild(0));
ret |= laTree->evaluateAnimations(currentTime);
}
ret |= m_paintingTree->prepare(currentTime, viewRect,
visibleRect, scale);
if (laTree)
laTree->computeTexturesAmount(texturesResultPtr);
if (/*!m_fastSwapMode && */ m_paintingTree->isReady()) {
XLOG("have painting tree %p ready, swapping!", m_paintingTree);
didTreeSwap = true;
swap();
if (treesSwappedPtr)
*treesSwappedPtr = true;
if (laTree && newTreeHasAnimPtr)
*newTreeHasAnimPtr = laTree->hasAnimations();
}
} else if (m_drawingTree) {
XLOG("preparing drawing tree %p", m_drawingTree);
ret |= m_drawingTree->prepare(currentTime, viewRect,
visibleRect, scale);
if (m_drawingTree->countChildren()) {
LayerAndroid* laTree = static_cast<LayerAndroid*>(m_drawingTree->getChild(0));
laTree->computeTexturesAmount(texturesResultPtr);
}
}
if (m_drawingTree) {
bool drawingReady = didTreeSwap || m_drawingTree->isReady();
if (didTreeSwap || m_fastSwapMode || (drawingReady && !m_paintingTree))
m_drawingTree->swapTiles();
if (drawingReady) {
// exit fast swap mode, as content is up to date
m_fastSwapMode = false;
} else {
// drawing isn't ready, must redraw
ret = true;
}
if (m_drawingTree->countChildren()) {
LayerAndroid* laTree = static_cast<LayerAndroid*>(m_drawingTree->getChild(0));
ret |= laTree->evaluateAnimations(currentTime);
}
XLOG("drawing tree %p", m_drawingTree);
ret |= m_drawingTree->drawGL(viewRect, visibleRect, scale);
} else if (m_paintingTree && m_paintingTree->state()) {
// Dont have a drawing tree, draw white background
Color defaultBackground = Color::white;
m_paintingTree->state()->drawBackground(defaultBackground);
}
if (m_paintingTree) {
XLOG("still have painting tree %p", m_paintingTree);
return true;
}
return ret;
}