Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 2644483002: Fix crash in CompressedTexSubImage taking 0 offset without pbo (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 7f49bd2f61f1d5e5c96eb4bcddb759db8d91fc6c..0c1ac65d3e1b84e45e7ba38f4a7d4964d8358813 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -2418,7 +2418,7 @@ void GLES2Implementation::CompressedTexSubImage2D(
helper_->CompressedTexSubImage2D(
target, level, xoffset, yoffset, width, height, format, image_size,
0, ToGLuint(data));
- } else {
+ } else if (data) {
SetBucketContents(kResultBucketId, data, image_size);
helper_->CompressedTexSubImage2DBucket(
target, level, xoffset, yoffset, width, height, format,
@@ -2427,6 +2427,9 @@ void GLES2Implementation::CompressedTexSubImage2D(
// and we don't have to wait for the result so from the client's perspective
// it's cheap.
helper_->SetBucketSize(kResultBucketId, 0);
+ } else {
+ helper_->CompressedTexSubImage2D(target, level, xoffset, yoffset, width,
+ height, format, image_size, 0, 0);
}
CheckGLError();
}
@@ -2521,7 +2524,7 @@ void GLES2Implementation::CompressedTexSubImage3D(
helper_->CompressedTexSubImage3D(
target, level, xoffset, yoffset, zoffset, width, height, depth, format,
image_size, 0, ToGLuint(data));
- } else {
+ } else if (data) {
SetBucketContents(kResultBucketId, data, image_size);
helper_->CompressedTexSubImage3DBucket(
target, level, xoffset, yoffset, zoffset, width, height, depth, format,
@@ -2530,6 +2533,10 @@ void GLES2Implementation::CompressedTexSubImage3D(
// and we don't have to wait for the result so from the client's perspective
// it's cheap.
helper_->SetBucketSize(kResultBucketId, 0);
+ } else {
+ helper_->CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset,
+ width, height, depth, format, image_size,
+ 0, 0);
}
CheckGLError();
}
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698