Merge pull request #2633 from clivest/progressive_codec_new_surface_fix

Fix rounding error in progressive codec surface new
This commit is contained in:
Marc-André Moreau 2015-05-20 09:41:18 -04:00
commit 05bc27e96d
1 changed files with 2 additions and 2 deletions

View File

@ -262,8 +262,8 @@ PROGRESSIVE_SURFACE_CONTEXT* progressive_surface_context_new(UINT16 surfaceId, U
surface->id = surfaceId;
surface->width = width;
surface->height = height;
surface->gridWidth = (width + (width % 64)) / 64;
surface->gridHeight = (height + (height % 64)) / 64;
surface->gridWidth = (width + (64 - width % 64)) / 64;
surface->gridHeight = (height + (64 - height % 64)) / 64;
surface->gridSize = surface->gridWidth * surface->gridHeight;
surface->tiles = (RFX_PROGRESSIVE_TILE*) calloc(surface->gridSize, sizeof(RFX_PROGRESSIVE_TILE));