Lines Matching refs:bounds

57     BlitFramebufferBounds bounds;  in GetBlitFramebufferBounds()  local
65 bounds.sourceBounds = gl::Rectangle(0, 0, readSize.width, readSize.height); in GetBlitFramebufferBounds()
66 bounds.sourceRegion = sourceArea.removeReversal(); in GetBlitFramebufferBounds()
68 bounds.destBounds = gl::Rectangle(0, 0, drawSize.width, drawSize.height); in GetBlitFramebufferBounds()
69 bounds.destRegion = destArea.removeReversal(); in GetBlitFramebufferBounds()
71 bounds.xFlipped = sourceArea.isReversedX() != destArea.isReversedX(); in GetBlitFramebufferBounds()
72 bounds.yFlipped = sourceArea.isReversedY() != destArea.isReversedY(); in GetBlitFramebufferBounds()
74 return bounds; in GetBlitFramebufferBounds()
875 BlitFramebufferBounds bounds = GetBlitFramebufferBounds(context, sourceArea, destArea); in adjustSrcDstRegion() local
877 if (bounds.destRegion.width == 0 || bounds.sourceRegion.width == 0 || in adjustSrcDstRegion()
878 bounds.destRegion.height == 0 || bounds.sourceRegion.height == 0) in adjustSrcDstRegion()
882 if (!ClipRectangle(bounds.destBounds, bounds.destRegion, nullptr)) in adjustSrcDstRegion()
887 if (!bounds.destBounds.encloses(bounds.destRegion)) in adjustSrcDstRegion()
899 GLint destOriginX = bounds.destRegion.x; in adjustSrcDstRegion()
900 GLint destOriginY = bounds.destRegion.y; in adjustSrcDstRegion()
902 GLint destClippedWidth = bounds.destRegion.width; in adjustSrcDstRegion()
903 while (destClippedWidth > 2 * bounds.destBounds.width) in adjustSrcDstRegion()
909 GLint destClippedHeight = bounds.destRegion.height; in adjustSrcDstRegion()
910 while (destClippedHeight > 2 * bounds.destBounds.height) in adjustSrcDstRegion()
921 GLint left = bounds.destRegion.x0(); in adjustSrcDstRegion()
922 GLint right = bounds.destRegion.x1(); in adjustSrcDstRegion()
923 GLint top = bounds.destRegion.y0(); in adjustSrcDstRegion()
924 GLint bottom = bounds.destRegion.y1(); in adjustSrcDstRegion()
927 if (left >= 0 && left < bounds.destBounds.width) in adjustSrcDstRegion()
930 destOriginX = bounds.destRegion.x; in adjustSrcDstRegion()
932 else if (right > 0 && right <= bounds.destBounds.width) in adjustSrcDstRegion()
940 extraXOffset = (bounds.destRegion.width - destClippedWidth) / 2; in adjustSrcDstRegion()
941 destOriginX = bounds.destRegion.x + extraXOffset; in adjustSrcDstRegion()
945 if (top >= 0 && top < bounds.destBounds.height) in adjustSrcDstRegion()
948 destOriginY = bounds.destRegion.y; in adjustSrcDstRegion()
950 else if (bottom > 0 && bottom <= bounds.destBounds.height) in adjustSrcDstRegion()
958 extraYOffset = (bounds.destRegion.height - destClippedHeight) / 2; in adjustSrcDstRegion()
959 destOriginY = bounds.destRegion.y + extraYOffset; in adjustSrcDstRegion()
967 CheckedNumeric<GLuint> checkedXOffset(destOriginX - bounds.destRegion.x - extraXOffset / 2); in adjustSrcDstRegion()
968 CheckedNumeric<GLuint> checkedYOffset(destOriginY - bounds.destRegion.y - extraYOffset / 2); in adjustSrcDstRegion()
972 if (bounds.xFlipped) in adjustSrcDstRegion()
975 (bounds.destRegion.x1() - (destOriginX + destClippedWidth) + extraXOffset / 2); in adjustSrcDstRegion()
977 if (bounds.yFlipped) in adjustSrcDstRegion()
980 (bounds.destRegion.y1() - (destOriginY + destClippedHeight) + extraYOffset / 2); in adjustSrcDstRegion()
991 bounds.destRegion = in adjustSrcDstRegion()
995 bounds.sourceRegion = gl::Rectangle(bounds.sourceRegion.x + (xOffset >> destXHalvings), in adjustSrcDstRegion()
996 bounds.sourceRegion.y + (yOffset >> destYHalvings), in adjustSrcDstRegion()
997 bounds.sourceRegion.width >> destXHalvings, in adjustSrcDstRegion()
998 bounds.sourceRegion.height >> destYHalvings); in adjustSrcDstRegion()
1001 if (bounds.sourceRegion.width == 0) in adjustSrcDstRegion()
1003 bounds.sourceRegion.width = 1; in adjustSrcDstRegion()
1005 if (bounds.sourceRegion.height == 0) in adjustSrcDstRegion()
1007 bounds.sourceRegion.height = 1; in adjustSrcDstRegion()
1011 if (!bounds.sourceBounds.encloses(bounds.sourceRegion)) in adjustSrcDstRegion()
1023 GLint sourceOriginX = bounds.sourceRegion.x; in adjustSrcDstRegion()
1024 GLint sourceOriginY = bounds.sourceRegion.y; in adjustSrcDstRegion()
1026 GLint sourceClippedWidth = bounds.sourceRegion.width; in adjustSrcDstRegion()
1027 while (sourceClippedWidth > 2 * bounds.sourceBounds.width) in adjustSrcDstRegion()
1033 GLint sourceClippedHeight = bounds.sourceRegion.height; in adjustSrcDstRegion()
1034 while (sourceClippedHeight > 2 * bounds.sourceBounds.height) in adjustSrcDstRegion()
1045 GLint left = bounds.sourceRegion.x0(); in adjustSrcDstRegion()
1046 GLint right = bounds.sourceRegion.x1(); in adjustSrcDstRegion()
1047 GLint top = bounds.sourceRegion.y0(); in adjustSrcDstRegion()
1048 GLint bottom = bounds.sourceRegion.y1(); in adjustSrcDstRegion()
1051 if (left >= 0 && left < bounds.sourceBounds.width) in adjustSrcDstRegion()
1054 sourceOriginX = bounds.sourceRegion.x; in adjustSrcDstRegion()
1056 else if (right > 0 && right <= bounds.sourceBounds.width) in adjustSrcDstRegion()
1064 extraXOffset = (bounds.sourceRegion.width - sourceClippedWidth) / 2; in adjustSrcDstRegion()
1065 sourceOriginX = bounds.sourceRegion.x + extraXOffset; in adjustSrcDstRegion()
1069 if (top >= 0 && top < bounds.sourceBounds.height) in adjustSrcDstRegion()
1072 sourceOriginY = bounds.sourceRegion.y; in adjustSrcDstRegion()
1074 else if (bottom > 0 && bottom <= bounds.sourceBounds.height) in adjustSrcDstRegion()
1082 extraYOffset = (bounds.sourceRegion.height - sourceClippedHeight) / 2; in adjustSrcDstRegion()
1083 sourceOriginY = bounds.sourceRegion.y + extraYOffset; in adjustSrcDstRegion()
1091 CheckedNumeric<GLuint> checkedXOffset(sourceOriginX - bounds.sourceRegion.x - in adjustSrcDstRegion()
1093 CheckedNumeric<GLuint> checkedYOffset(sourceOriginY - bounds.sourceRegion.y - in adjustSrcDstRegion()
1098 if (bounds.xFlipped) in adjustSrcDstRegion()
1100 checkedXOffset = (bounds.sourceRegion.x1() - (sourceOriginX + sourceClippedWidth) + in adjustSrcDstRegion()
1103 if (bounds.yFlipped) in adjustSrcDstRegion()
1105 checkedYOffset = (bounds.sourceRegion.y1() - (sourceOriginY + sourceClippedHeight) + in adjustSrcDstRegion()
1117 bounds.sourceRegion = in adjustSrcDstRegion()
1121 bounds.destRegion = gl::Rectangle(bounds.destRegion.x + (xOffset >> sourceXHalvings), in adjustSrcDstRegion()
1122 bounds.destRegion.y + (yOffset >> sourceYHalvings), in adjustSrcDstRegion()
1123 bounds.destRegion.width >> sourceXHalvings, in adjustSrcDstRegion()
1124 bounds.destRegion.height >> sourceYHalvings); in adjustSrcDstRegion()
1128 *newSourceArea = bounds.sourceRegion.flip(sourceArea.isReversedX(), sourceArea.isReversedY()); in adjustSrcDstRegion()
1129 *newDestArea = bounds.destRegion.flip(destArea.isReversedX(), destArea.isReversedY()); in adjustSrcDstRegion()
1140 BlitFramebufferBounds bounds = GetBlitFramebufferBounds(context, sourceArea, destArea); in clipSrcRegion() local
1142 if (bounds.destRegion.width == 0 || bounds.sourceRegion.width == 0 || in clipSrcRegion()
1143 bounds.destRegion.height == 0 || bounds.sourceRegion.height == 0) in clipSrcRegion()
1147 if (!ClipRectangle(bounds.destBounds, bounds.destRegion, nullptr)) in clipSrcRegion()
1152 if (!bounds.sourceBounds.encloses(bounds.sourceRegion)) in clipSrcRegion()
1157 if (!ClipRectangle(bounds.sourceRegion, bounds.sourceBounds, &realSourceRegion)) in clipSrcRegion()
1161 GLuint xOffset = realSourceRegion.x - bounds.sourceRegion.x; in clipSrcRegion()
1162 GLuint yOffset = realSourceRegion.y - bounds.sourceRegion.y; in clipSrcRegion()
1166 if (bounds.xFlipped) in clipSrcRegion()
1168 xOffset = bounds.sourceRegion.x1() - realSourceRegion.x1(); in clipSrcRegion()
1170 if (bounds.yFlipped) in clipSrcRegion()
1172 yOffset = bounds.sourceRegion.y1() - realSourceRegion.y1(); in clipSrcRegion()
1176 bounds.destRegion.width / bounds.sourceRegion.width; in clipSrcRegion()
1178 bounds.destRegion.height / bounds.sourceRegion.height; in clipSrcRegion()
1180 static_cast<GLfloat>(xOffset) * bounds.destRegion.width / bounds.sourceRegion.width; in clipSrcRegion()
1182 static_cast<GLfloat>(yOffset) * bounds.destRegion.height / bounds.sourceRegion.height; in clipSrcRegion()
1185 static_cast<GLuint>(std::round(bounds.destRegion.x + destMappingXOffset)); in clipSrcRegion()
1187 static_cast<GLuint>(std::round(bounds.destRegion.y + destMappingYOffset)); in clipSrcRegion()
1190 std::round(bounds.destRegion.x + destMappingXOffset + destMappingWidth)); in clipSrcRegion()
1192 std::round(bounds.destRegion.y + destMappingYOffset + destMappingHeight)); in clipSrcRegion()
1194 bounds.destRegion = in clipSrcRegion()
1198 bounds.sourceRegion = realSourceRegion; in clipSrcRegion()
1202 *newSourceArea = bounds.sourceRegion.flip(sourceArea.isReversedX(), sourceArea.isReversedY()); in clipSrcRegion()
1203 *newDestArea = bounds.destRegion.flip(destArea.isReversedX(), destArea.isReversedY()); in clipSrcRegion()