Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the default max texture size for frame quads. #1212

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

### Changes
- Change how extensions and fallback priorities in Girder interact ([#1208](../../pull/1208))
- Reduce the default max texture size for frame quads ([#1212](../../pull/1212))

### Bug Fixes
- Fix clearing the style threshold cache ([#1210](../../pull/1210))
-
-
## 1.22.4

### Bug Fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function setFrameQuad(tileinfo, layer, options) {
try {
maxTextureSize = layer.renderer()._maxTextureSize || layer.renderer().constructor._maxTextureSize;
} catch (err) { }
options = Object.assign({}, {maxTextureSize: Math.min(16384, maxTextureSize)}, options);
options = Object.assign({}, {maxTextureSize: Math.min(8192, maxTextureSize || 8192)}, options);
const status = {
tileinfo: tileinfo,
options: options,
Expand Down
2 changes: 1 addition & 1 deletion large_image/tilesource/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ def getTileFramesQuadInfo(metadata, options=None):
'frameGroup': 1,
'frameGroupFactor': 4,
'frameGroupStride': 1,
'maxTextureSize': 16384,
'maxTextureSize': 8192,
'maxTextures': 1,
'maxTotalTexturePixels': 1024 * 1024 * 1024,
'alignment': 16,
Expand Down
13 changes: 7 additions & 6 deletions test/test_source_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def testTileOverlapWithRegionOffset():


@pytest.mark.parametrize('options,lensrc,lenquads,frame10,src0,srclast,quads10', [
({}, 1, 250, 10, {
({'maxTextureSize': 16384}, 1, 250, 10, {
'encoding': 'JPEG',
'exact': False,
'fill': 'corner:black',
Expand Down Expand Up @@ -402,7 +402,7 @@ def testTileOverlapWithRegionOffset():
'top': 3816,
}),

({'maxTextures': 8}, 4, 250, 10, {
({'maxTextureSize': 16384, 'maxTextures': 8}, 4, 250, 10, {
'framesAcross': 7,
'height': 1632,
'width': 2176,
Expand All @@ -420,7 +420,8 @@ def testTileOverlapWithRegionOffset():
'top': 2304,
}),

({'maxTextures': 8, 'maxTotalTexturePixels': 8 * 1024 ** 3}, 8, 250, 10, {
({'maxTextureSize': 16384,
'maxTextures': 8, 'maxTotalTexturePixels': 8 * 1024 ** 3}, 8, 250, 10, {
'framesAcross': 5,
'height': 2336,
'width': 3120,
Expand All @@ -429,7 +430,7 @@ def testTileOverlapWithRegionOffset():
'top': 9344,
}),

({'alignment': 32}, 1, 250, 10, {
({'maxTextureSize': 16384, 'alignment': 32}, 1, 250, 10, {
'framesAcross': 14,
'height': 864,
'width': 1152,
Expand All @@ -438,7 +439,7 @@ def testTileOverlapWithRegionOffset():
'top': 14688,
}),

({'frameBase': 100}, 1, 150, 110, {
({'maxTextureSize': 16384, 'frameBase': 100}, 1, 150, 110, {
'framesAcross': 11,
'height': 1088,
'width': 1456,
Expand All @@ -447,7 +448,7 @@ def testTileOverlapWithRegionOffset():
'top': 14144,
}),

({'frameStride': 10}, 1, 25, 100, {
({'maxTextureSize': 16384, 'frameStride': 10}, 1, 25, 100, {
'framesAcross': 5,
'height': 2448,
'width': 3264,
Expand Down