Permalink
Browse files

GLES: Fix to delete subimage data since #11447.

  • Loading branch information...
xebra committed Oct 7, 2018
1 parent 46d30d0 commit 0d7a5cd093397ebae5c06c55e824a871c04548ff
Showing with 13 additions and 1 deletion.
  1. +13 −1 ext/native/thin3d/GLQueueRunner.cpp
@@ -490,7 +490,19 @@ void GLQueueRunner::RunSteps(const std::vector<GLRStep *> &steps, bool skipGLCal
const GLRStep &step = *steps[i];
switch (step.stepType) {
case GLRStepType::RENDER:
// TODO: With #11425 there'll be a case where we should really free spline data here.
for (const auto &c : step.commands) {
switch (c.cmd) {
case GLRRenderCommand::TEXTURE_SUBIMAGE:
if (c.texture_subimage.data) {
if (c.texture_subimage.allocType == GLRAllocType::ALIGNED) {
FreeAlignedMemory(c.texture_subimage.data);
} else if (c.texture_subimage.allocType == GLRAllocType::NEW) {
delete[] c.texture_subimage.data;
}
}
break;
}
}
break;
}
delete steps[i];

0 comments on commit 0d7a5cd

Please sign in to comment.