Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 39ec60a

Browse files
egdanielSkia Commit-Bot
authored andcommitted
Don't delete gl textures on failed update.
Change-Id: I5bea5e845c5098c8885a75cf9602a1231dbee3ac Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289785 Commit-Queue: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
1 parent c2e80e1 commit 39ec60a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/gpu/gl/GrGLGpu.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3611,7 +3611,6 @@ bool GrGLGpu::onUpdateBackendTexture(const GrBackendTexture& backendTexture,
36113611
backendTexture.height(), GR_GL_TEXTURE_2D, 0, 0,
36123612
backendTexture.width(), backendTexture.height(),
36133613
colorType, texels.begin(), texels.count())) {
3614-
GL_CALL(DeleteTextures(1, &info.fID));
36153614
return false;
36163615
}
36173616
} else if (data && data->type() == BackendTextureData::Type::kColor) {
@@ -3621,7 +3620,6 @@ bool GrGLGpu::onUpdateBackendTexture(const GrBackendTexture& backendTexture,
36213620
this->glCaps().getTexSubImageDefaultFormatTypeAndColorType(glFormat, &externalFormat,
36223621
&externalType, &colorType);
36233622
if (colorType == GrColorType::kUnknown) {
3624-
GL_CALL(DeleteTextures(1, &info.fID));
36253623
return false;
36263624
}
36273625

@@ -3630,7 +3628,6 @@ bool GrGLGpu::onUpdateBackendTexture(const GrBackendTexture& backendTexture,
36303628
auto rb = ii.minRowBytes();
36313629
std::unique_ptr<char[]> pixelStorage(new char[rb * backendTexture.height()]);
36323630
if (!GrClearImage(ii, pixelStorage.get(), rb, data->color())) {
3633-
GL_CALL(DeleteTextures(1, &info.fID));
36343631
return false;
36353632
}
36363633

0 commit comments

Comments
 (0)