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

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

Issue 2558933003: Cache GL's viewport on the GPU command buffer client side. (Closed)
Patch Set: Created 4 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
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 986dbba7e3603d696fabe1ac235414e38671b435..8c544d63d9dc435e4eb51f1e03380f32637faf01 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3552,6 +3552,12 @@ Capabilities GLES2DecoderImpl::GetCapabilities() {
&caps.max_vertex_texture_image_units, 1);
DoGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS, &caps.max_vertex_uniform_vectors,
1);
+ {
+ GLint dims[2] = {0, 0};
+ DoGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims, 2);
+ caps.max_viewport_width = dims[0];
+ caps.max_viewport_height = dims[1];
+ }
DoGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS,
&caps.num_compressed_texture_formats, 1);
DoGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &caps.num_shader_binary_formats,

Powered by Google App Engine
This is Rietveld 408576698