本文整理汇总了C++中ShaderProgram::calculateAnimationDelta方法的典型用法代码示例。如果您正苦于以下问题:C++ ShaderProgram::calculateAnimationDelta方法的具体用法?C++ ShaderProgram::calculateAnimationDelta怎么用?C++ ShaderProgram::calculateAnimationDelta使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShaderProgram
的用法示例。
在下文中一共展示了ShaderProgram::calculateAnimationDelta方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupDrawing
double GLWebViewState::setupDrawing(IntRect& viewRect, SkRect& visibleRect,
IntRect& webViewRect, int titleBarHeight,
IntRect& screenClip, float scale)
{
int left = viewRect.x();
int top = viewRect.y();
int width = viewRect.width();
int height = viewRect.height();
ShaderProgram* shader = TilesManager::instance()->shader();
if (shader->program() == -1) {
XLOG("Reinit shader");
shader->init();
}
shader->setViewport(visibleRect, scale);
shader->setViewRect(viewRect);
shader->setWebViewRect(webViewRect);
shader->setTitleBarHeight(titleBarHeight);
shader->setScreenClip(screenClip);
shader->resetBlending();
shader->calculateAnimationDelta();
glViewport(left + shader->getAnimationDeltaX(),
top - shader->getAnimationDeltaY(),
width, height);
double currentTime = WTF::currentTime();
setViewport(visibleRect, scale);
m_zoomManager.processNewScale(currentTime, scale);
return currentTime;
}