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

Side by Side 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: fix 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 unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/service/gl_utils.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 3534 matching lines...) Expand 10 before | Expand all | Expand 10 after
3545 &caps.max_fragment_uniform_vectors, 1); 3545 &caps.max_fragment_uniform_vectors, 1);
3546 DoGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &caps.max_renderbuffer_size, 1); 3546 DoGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &caps.max_renderbuffer_size, 1);
3547 DoGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &caps.max_texture_image_units, 1); 3547 DoGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &caps.max_texture_image_units, 1);
3548 DoGetIntegerv(GL_MAX_TEXTURE_SIZE, &caps.max_texture_size, 1); 3548 DoGetIntegerv(GL_MAX_TEXTURE_SIZE, &caps.max_texture_size, 1);
3549 DoGetIntegerv(GL_MAX_VARYING_VECTORS, &caps.max_varying_vectors, 1); 3549 DoGetIntegerv(GL_MAX_VARYING_VECTORS, &caps.max_varying_vectors, 1);
3550 DoGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &caps.max_vertex_attribs, 1); 3550 DoGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &caps.max_vertex_attribs, 1);
3551 DoGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, 3551 DoGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS,
3552 &caps.max_vertex_texture_image_units, 1); 3552 &caps.max_vertex_texture_image_units, 1);
3553 DoGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS, &caps.max_vertex_uniform_vectors, 3553 DoGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS, &caps.max_vertex_uniform_vectors,
3554 1); 3554 1);
3555 {
3556 GLint dims[2] = {0, 0};
3557 DoGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims, 2);
3558 caps.max_viewport_width = dims[0];
3559 caps.max_viewport_height = dims[1];
3560 }
3555 DoGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, 3561 DoGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS,
3556 &caps.num_compressed_texture_formats, 1); 3562 &caps.num_compressed_texture_formats, 1);
3557 DoGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &caps.num_shader_binary_formats, 3563 DoGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &caps.num_shader_binary_formats,
3558 1); 3564 1);
3559 DoGetIntegerv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, 3565 DoGetIntegerv(GL_BIND_GENERATES_RESOURCE_CHROMIUM,
3560 &caps.bind_generates_resource_chromium, 1); 3566 &caps.bind_generates_resource_chromium, 1);
3561 if (feature_info_->IsWebGL2OrES3Context()) { 3567 if (feature_info_->IsWebGL2OrES3Context()) {
3562 // TODO(zmo): Note that some parameter values could be more than 32-bit, 3568 // TODO(zmo): Note that some parameter values could be more than 32-bit,
3563 // but for now we clamp them to 32-bit max. 3569 // but for now we clamp them to 32-bit max.
3564 DoGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &caps.max_3d_texture_size, 1); 3570 DoGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &caps.max_3d_texture_size, 1);
(...skipping 15369 matching lines...) Expand 10 before | Expand all | Expand 10 after
18934 } 18940 }
18935 18941
18936 // Include the auto-generated part of this file. We split this because it means 18942 // Include the auto-generated part of this file. We split this because it means
18937 // we can easily edit the non-auto generated parts right here in this file 18943 // we can easily edit the non-auto generated parts right here in this file
18938 // instead of having to edit some template or the code generator. 18944 // instead of having to edit some template or the code generator.
18939 #include "base/macros.h" 18945 #include "base/macros.h"
18940 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 18946 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
18941 18947
18942 } // namespace gles2 18948 } // namespace gles2
18943 } // namespace gpu 18949 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gl_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698