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

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

Issue 2447423002: Handle CompressedTex{Sub}Image{2|3}D interaction with PBO. (Closed)
Patch Set: rebase Created 4 years, 2 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 | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | 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 6ea01d79b59eb308d3653c85b42f862d50632a92..fdc0727ba1db87352cf5fa39661f25904adcb54f 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -2380,13 +2380,20 @@ void GLES2Implementation::CompressedTexSubImage2D(
}
return;
}
- SetBucketContents(kResultBucketId, data, image_size);
- helper_->CompressedTexSubImage2DBucket(
- target, level, xoffset, yoffset, width, height, format, kResultBucketId);
- // Free the bucket. This is not required but it does free up the memory.
- // and we don't have to wait for the result so from the client's perspective
- // it's cheap.
- helper_->SetBucketSize(kResultBucketId, 0);
+ if (bound_pixel_unpack_buffer_) {
+ helper_->CompressedTexSubImage2D(
+ target, level, xoffset, yoffset, width, height, format, image_size,
+ 0, ToGLuint(data));
+ } else {
+ SetBucketContents(kResultBucketId, data, image_size);
+ helper_->CompressedTexSubImage2DBucket(
+ target, level, xoffset, yoffset, width, height, format,
+ kResultBucketId);
+ // Free the bucket. This is not required but it does free up the memory.
+ // and we don't have to wait for the result so from the client's perspective
+ // it's cheap.
+ helper_->SetBucketSize(kResultBucketId, 0);
+ }
CheckGLError();
}
@@ -2423,7 +2430,11 @@ void GLES2Implementation::CompressedTexImage3D(
}
return;
}
- if (data) {
+ if (bound_pixel_unpack_buffer_) {
+ helper_->CompressedTexImage3D(
+ target, level, internalformat, width, height, depth, image_size,
+ 0, ToGLuint(data));
+ } else if (data) {
SetBucketContents(kResultBucketId, data, image_size);
helper_->CompressedTexImage3DBucket(target, level, internalformat, width,
height, depth, kResultBucketId);
@@ -2472,14 +2483,20 @@ void GLES2Implementation::CompressedTexSubImage3D(
}
return;
}
- SetBucketContents(kResultBucketId, data, image_size);
- helper_->CompressedTexSubImage3DBucket(
- target, level, xoffset, yoffset, zoffset, width, height, depth, format,
- kResultBucketId);
- // Free the bucket. This is not required but it does free up the memory.
- // and we don't have to wait for the result so from the client's perspective
- // it's cheap.
- helper_->SetBucketSize(kResultBucketId, 0);
+ if (bound_pixel_unpack_buffer_) {
+ helper_->CompressedTexSubImage3D(
+ target, level, xoffset, yoffset, zoffset, width, height, depth, format,
+ image_size, 0, ToGLuint(data));
+ } else {
+ SetBucketContents(kResultBucketId, data, image_size);
+ helper_->CompressedTexSubImage3DBucket(
+ target, level, xoffset, yoffset, zoffset, width, height, depth, format,
+ kResultBucketId);
+ // Free the bucket. This is not required but it does free up the memory.
+ // and we don't have to wait for the result so from the client's perspective
+ // it's cheap.
+ helper_->SetBucketSize(kResultBucketId, 0);
+ }
CheckGLError();
}
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698