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

Unified Diff: gpu/command_buffer/service/context_state.cc

Issue 1508953002: Implement helper functionalities for computing image size with ES3 settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/service/context_state.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_state.cc
diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc
index b93a37295dfb7664f83236529d4aa2f299e05af7..4cbf2941b319461244e2754112efa5fb432dcd87 100644
--- a/gpu/command_buffer/service/context_state.cc
+++ b/gpu/command_buffer/service/context_state.cc
@@ -594,6 +594,28 @@ void ContextState::UnbindSampler(Sampler* sampler) {
}
}
+PixelStoreParams ContextState::GetPackParams() {
+ PixelStoreParams params;
+ params.alignment = pack_alignment;
+ params.row_length = pack_row_length;
+ params.skip_pixels = pack_skip_pixels;
+ params.skip_rows = pack_skip_rows;
+ return params;
+}
+
+PixelStoreParams ContextState::GetUnpackParams(Dimension dimension) {
+ PixelStoreParams params;
+ params.alignment = unpack_alignment;
+ params.row_length = unpack_row_length;
+ params.skip_pixels = unpack_skip_pixels;
+ params.skip_rows = unpack_skip_rows;
+ if (dimension == k3D) {
+ params.image_height = unpack_image_height;
+ params.skip_images = unpack_skip_images;
+ }
+ return params;
+}
+
// Include the auto-generated part of this file. We split this because it means
// we can easily edit the non-auto generated parts right here in this file
// instead of having to edit some template or the code generator.
« no previous file with comments | « gpu/command_buffer/service/context_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698