| 2747 | } |
| 2748 | |
| 2749 | bool |
| 2750 | ViewerGL::checkIfViewPortRoIValidOrRenderForInput(int texIndex) |
| 2751 | { |
| 2752 | |
| 2753 | unsigned int mipMapLevel = (unsigned int)std::max((int)getInternalNode()->getMipMapLevelFromZoomFactor(), (int)getInternalNode()->getViewerMipMapLevel()); |
| 2754 | int closestPo2 = 1 << mipMapLevel; |
| 2755 | if (closestPo2 != _imp->displayTextures[texIndex].texture->getTextureRect().closestPo2) { |
| 2756 | return false; |
| 2757 | } |
| 2758 | RectI roiNotRounded; |
| 2759 | RectI roi = getImageRectangleDisplayedRoundedToTileSize(texIndex, _imp->displayTextures[texIndex].rod, _imp->displayTextures[texIndex].texture->getTextureRect().par, mipMapLevel, 0, 0, 0, &roiNotRounded); |
| 2760 | const RectI& currentTexRoi = _imp->displayTextures[texIndex].texture->getTextureRect(); |
| 2761 | if (!currentTexRoi.contains(roi)) { |
| 2762 | return false; |
| 2763 | } |
| 2764 | _imp->displayTextures[texIndex].roiNotRoundedToTileSize.set(roiNotRounded); |
| 2765 | |
| 2766 | return true; |
| 2767 | } |
| 2768 | |
| 2769 | void |
| 2770 | ViewerGL::checkIfViewPortRoIValidOrRender() |
nothing calls this directly
no test coverage detected