Skip to content

Commit

Permalink
GLES: Fix to delete subimage data since hrydgard#11447.
Browse files Browse the repository at this point in the history
  • Loading branch information
xebra committed Oct 7, 2018
1 parent 46d30d0 commit 0d7a5cd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ext/native/thin3d/GLQueueRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 0d7a5cd

Please sign in to comment.