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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc

Issue 2764403002: Make sure buffers are large enough to hold the Result structure. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_passthrough.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h"
6 6
7 namespace gpu { 7 namespace gpu {
8 namespace gles2 { 8 namespace gles2 {
9 9
10 // Custom Handlers 10 // Custom Handlers
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 const volatile void* cmd_data) { 219 const volatile void* cmd_data) {
220 const volatile gles2::cmds::GetActiveUniformBlockiv& c = 220 const volatile gles2::cmds::GetActiveUniformBlockiv& c =
221 *static_cast<const volatile gles2::cmds::GetActiveUniformBlockiv*>( 221 *static_cast<const volatile gles2::cmds::GetActiveUniformBlockiv*>(
222 cmd_data); 222 cmd_data);
223 GLuint program = static_cast<GLuint>(c.program); 223 GLuint program = static_cast<GLuint>(c.program);
224 GLuint uniformBlockIndex = static_cast<GLuint>(c.index); 224 GLuint uniformBlockIndex = static_cast<GLuint>(c.index);
225 GLenum pname = static_cast<GLenum>(c.pname); 225 GLenum pname = static_cast<GLenum>(c.pname);
226 unsigned int buffer_size = 0; 226 unsigned int buffer_size = 0;
227 typedef cmds::GetActiveUniformBlockiv::Result Result; 227 typedef cmds::GetActiveUniformBlockiv::Result Result;
228 Result* result = GetSharedMemoryAndSizeAs<Result*>( 228 Result* result = GetSharedMemoryAndSizeAs<Result*>(
229 c.params_shm_id, c.params_shm_offset, &buffer_size); 229 c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size);
230 GLint* params = result ? result->GetData() : NULL; 230 GLint* params = result ? result->GetData() : NULL;
231 if (params == NULL) { 231 if (params == NULL) {
232 return error::kOutOfBounds; 232 return error::kOutOfBounds;
233 } 233 }
234 GLsizei bufsize = Result::ComputeMaxResults(buffer_size); 234 GLsizei bufsize = Result::ComputeMaxResults(buffer_size);
235 GLsizei length = 0; 235 GLsizei length = 0;
236 error::Error error = DoGetActiveUniformBlockiv( 236 error::Error error = DoGetActiveUniformBlockiv(
237 program, uniformBlockIndex, pname, bufsize, &length, params); 237 program, uniformBlockIndex, pname, bufsize, &length, params);
238 if (error != error::kNoError) { 238 if (error != error::kNoError) {
239 return error; 239 return error;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 uint32_t immediate_data_size, 439 uint32_t immediate_data_size,
440 const volatile void* cmd_data) { 440 const volatile void* cmd_data) {
441 const volatile gles2::cmds::GetInternalformativ& c = 441 const volatile gles2::cmds::GetInternalformativ& c =
442 *static_cast<const volatile gles2::cmds::GetInternalformativ*>(cmd_data); 442 *static_cast<const volatile gles2::cmds::GetInternalformativ*>(cmd_data);
443 GLenum target = static_cast<GLenum>(c.target); 443 GLenum target = static_cast<GLenum>(c.target);
444 GLenum internalformat = static_cast<GLenum>(c.format); 444 GLenum internalformat = static_cast<GLenum>(c.format);
445 GLenum pname = static_cast<GLenum>(c.pname); 445 GLenum pname = static_cast<GLenum>(c.pname);
446 unsigned int buffer_size = 0; 446 unsigned int buffer_size = 0;
447 typedef cmds::GetInternalformativ::Result Result; 447 typedef cmds::GetInternalformativ::Result Result;
448 Result* result = GetSharedMemoryAndSizeAs<Result*>( 448 Result* result = GetSharedMemoryAndSizeAs<Result*>(
449 c.params_shm_id, c.params_shm_offset, &buffer_size); 449 c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size);
450 GLint* params = result ? result->GetData() : NULL; 450 GLint* params = result ? result->GetData() : NULL;
451 if (params == NULL) { 451 if (params == NULL) {
452 return error::kOutOfBounds; 452 return error::kOutOfBounds;
453 } 453 }
454 GLsizei bufsize = Result::ComputeMaxResults(buffer_size); 454 GLsizei bufsize = Result::ComputeMaxResults(buffer_size);
455 GLsizei length = 0; 455 GLsizei length = 0;
456 error::Error error = DoGetInternalformativ(target, internalformat, pname, 456 error::Error error = DoGetInternalformativ(target, internalformat, pname,
457 bufsize, &length, params); 457 bufsize, &length, params);
458 if (error != error::kNoError) { 458 if (error != error::kNoError) {
459 return error; 459 return error;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 error::Error GLES2DecoderPassthroughImpl::HandleGetUniformfv( 648 error::Error GLES2DecoderPassthroughImpl::HandleGetUniformfv(
649 uint32_t immediate_data_size, 649 uint32_t immediate_data_size,
650 const volatile void* cmd_data) { 650 const volatile void* cmd_data) {
651 const volatile gles2::cmds::GetUniformfv& c = 651 const volatile gles2::cmds::GetUniformfv& c =
652 *static_cast<const volatile gles2::cmds::GetUniformfv*>(cmd_data); 652 *static_cast<const volatile gles2::cmds::GetUniformfv*>(cmd_data);
653 GLuint program = static_cast<GLuint>(c.program); 653 GLuint program = static_cast<GLuint>(c.program);
654 GLint location = static_cast<GLint>(c.location); 654 GLint location = static_cast<GLint>(c.location);
655 unsigned int buffer_size = 0; 655 unsigned int buffer_size = 0;
656 typedef cmds::GetUniformfv::Result Result; 656 typedef cmds::GetUniformfv::Result Result;
657 Result* result = GetSharedMemoryAndSizeAs<Result*>( 657 Result* result = GetSharedMemoryAndSizeAs<Result*>(
658 c.params_shm_id, c.params_shm_offset, &buffer_size); 658 c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size);
659 GLfloat* params = result ? result->GetData() : NULL; 659 GLfloat* params = result ? result->GetData() : NULL;
660 if (params == NULL) { 660 if (params == NULL) {
661 return error::kOutOfBounds; 661 return error::kOutOfBounds;
662 } 662 }
663 GLsizei bufsize = Result::ComputeMaxResults(buffer_size); 663 GLsizei bufsize = Result::ComputeMaxResults(buffer_size);
664 GLsizei length = 0; 664 GLsizei length = 0;
665 error::Error error = 665 error::Error error =
666 DoGetUniformfv(program, location, bufsize, &length, params); 666 DoGetUniformfv(program, location, bufsize, &length, params);
667 if (error != error::kNoError) { 667 if (error != error::kNoError) {
668 return error; 668 return error;
669 } 669 }
670 if (length > bufsize) { 670 if (length > bufsize) {
671 return error::kOutOfBounds; 671 return error::kOutOfBounds;
672 } 672 }
673 result->SetNumResults(length); 673 result->SetNumResults(length);
674 return error::kNoError; 674 return error::kNoError;
675 } 675 }
676 676
677 error::Error GLES2DecoderPassthroughImpl::HandleGetUniformiv( 677 error::Error GLES2DecoderPassthroughImpl::HandleGetUniformiv(
678 uint32_t immediate_data_size, 678 uint32_t immediate_data_size,
679 const volatile void* cmd_data) { 679 const volatile void* cmd_data) {
680 const volatile gles2::cmds::GetUniformiv& c = 680 const volatile gles2::cmds::GetUniformiv& c =
681 *static_cast<const volatile gles2::cmds::GetUniformiv*>(cmd_data); 681 *static_cast<const volatile gles2::cmds::GetUniformiv*>(cmd_data);
682 GLuint program = static_cast<GLuint>(c.program); 682 GLuint program = static_cast<GLuint>(c.program);
683 GLint location = static_cast<GLint>(c.location); 683 GLint location = static_cast<GLint>(c.location);
684 unsigned int buffer_size = 0; 684 unsigned int buffer_size = 0;
685 typedef cmds::GetUniformiv::Result Result; 685 typedef cmds::GetUniformiv::Result Result;
686 Result* result = GetSharedMemoryAndSizeAs<Result*>( 686 Result* result = GetSharedMemoryAndSizeAs<Result*>(
687 c.params_shm_id, c.params_shm_offset, &buffer_size); 687 c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size);
688 GLint* params = result ? result->GetData() : NULL; 688 GLint* params = result ? result->GetData() : NULL;
689 if (params == NULL) { 689 if (params == NULL) {
690 return error::kOutOfBounds; 690 return error::kOutOfBounds;
691 } 691 }
692 GLsizei bufsize = Result::ComputeMaxResults(buffer_size); 692 GLsizei bufsize = Result::ComputeMaxResults(buffer_size);
693 GLsizei length = 0; 693 GLsizei length = 0;
694 error::Error error = 694 error::Error error =
695 DoGetUniformiv(program, location, bufsize, &length, params); 695 DoGetUniformiv(program, location, bufsize, &length, params);
696 if (error != error::kNoError) { 696 if (error != error::kNoError) {
697 return error; 697 return error;
698 } 698 }
699 if (length > bufsize) { 699 if (length > bufsize) {
700 return error::kOutOfBounds; 700 return error::kOutOfBounds;
701 } 701 }
702 result->SetNumResults(length); 702 result->SetNumResults(length);
703 return error::kNoError; 703 return error::kNoError;
704 } 704 }
705 705
706 error::Error GLES2DecoderPassthroughImpl::HandleGetUniformuiv( 706 error::Error GLES2DecoderPassthroughImpl::HandleGetUniformuiv(
707 uint32_t immediate_data_size, 707 uint32_t immediate_data_size,
708 const volatile void* cmd_data) { 708 const volatile void* cmd_data) {
709 const volatile gles2::cmds::GetUniformuiv& c = 709 const volatile gles2::cmds::GetUniformuiv& c =
710 *static_cast<const volatile gles2::cmds::GetUniformuiv*>(cmd_data); 710 *static_cast<const volatile gles2::cmds::GetUniformuiv*>(cmd_data);
711 GLuint program = static_cast<GLuint>(c.program); 711 GLuint program = static_cast<GLuint>(c.program);
712 GLint location = static_cast<GLint>(c.location); 712 GLint location = static_cast<GLint>(c.location);
713 unsigned int buffer_size = 0; 713 unsigned int buffer_size = 0;
714 typedef cmds::GetUniformuiv::Result Result; 714 typedef cmds::GetUniformuiv::Result Result;
715 Result* result = GetSharedMemoryAndSizeAs<Result*>( 715 Result* result = GetSharedMemoryAndSizeAs<Result*>(
716 c.params_shm_id, c.params_shm_offset, &buffer_size); 716 c.params_shm_id, c.params_shm_offset, sizeof(Result), &buffer_size);
717 GLuint* params = result ? result->GetData() : NULL; 717 GLuint* params = result ? result->GetData() : NULL;
718 if (params == NULL) { 718 if (params == NULL) {
719 return error::kOutOfBounds; 719 return error::kOutOfBounds;
720 } 720 }
721 GLsizei bufsize = Result::ComputeMaxResults(buffer_size); 721 GLsizei bufsize = Result::ComputeMaxResults(buffer_size);
722 GLsizei length = 0; 722 GLsizei length = 0;
723 error::Error error = 723 error::Error error =
724 DoGetUniformuiv(program, location, bufsize, &length, params); 724 DoGetUniformuiv(program, location, bufsize, &length, params);
725 if (error != error::kNoError) { 725 if (error != error::kNoError) {
726 return error; 726 return error;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 uint32_t immediate_data_size, 807 uint32_t immediate_data_size,
808 const volatile void* cmd_data) { 808 const volatile void* cmd_data) {
809 const volatile gles2::cmds::GetVertexAttribPointerv& c = 809 const volatile gles2::cmds::GetVertexAttribPointerv& c =
810 *static_cast<const volatile gles2::cmds::GetVertexAttribPointerv*>( 810 *static_cast<const volatile gles2::cmds::GetVertexAttribPointerv*>(
811 cmd_data); 811 cmd_data);
812 GLuint index = static_cast<GLuint>(c.index); 812 GLuint index = static_cast<GLuint>(c.index);
813 GLenum pname = static_cast<GLenum>(c.pname); 813 GLenum pname = static_cast<GLenum>(c.pname);
814 unsigned int buffer_size = 0; 814 unsigned int buffer_size = 0;
815 typedef cmds::GetVertexAttribPointerv::Result Result; 815 typedef cmds::GetVertexAttribPointerv::Result Result;
816 Result* result = GetSharedMemoryAndSizeAs<Result*>( 816 Result* result = GetSharedMemoryAndSizeAs<Result*>(
817 c.pointer_shm_id, c.pointer_shm_offset, &buffer_size); 817 c.pointer_shm_id, c.pointer_shm_offset, sizeof(Result), &buffer_size);
818 GLuint* params = result ? result->GetData() : NULL; 818 GLuint* params = result ? result->GetData() : NULL;
819 if (params == NULL) { 819 if (params == NULL) {
820 return error::kOutOfBounds; 820 return error::kOutOfBounds;
821 } 821 }
822 GLsizei bufsize = Result::ComputeMaxResults(buffer_size); 822 GLsizei bufsize = Result::ComputeMaxResults(buffer_size);
823 GLsizei length = 0; 823 GLsizei length = 0;
824 error::Error error = 824 error::Error error =
825 DoGetVertexAttribPointerv(index, pname, bufsize, &length, params); 825 DoGetVertexAttribPointerv(index, pname, bufsize, &length, params);
826 if (error != error::kNoError) { 826 if (error != error::kNoError) {
827 return error; 827 return error;
(...skipping 28 matching lines...) Expand all
856 GLint y = static_cast<GLint>(c.y); 856 GLint y = static_cast<GLint>(c.y);
857 GLsizei width = static_cast<GLsizei>(c.width); 857 GLsizei width = static_cast<GLsizei>(c.width);
858 GLsizei height = static_cast<GLsizei>(c.height); 858 GLsizei height = static_cast<GLsizei>(c.height);
859 GLenum format = static_cast<GLenum>(c.format); 859 GLenum format = static_cast<GLenum>(c.format);
860 GLenum type = static_cast<GLenum>(c.type); 860 GLenum type = static_cast<GLenum>(c.type);
861 861
862 uint8_t* pixels = nullptr; 862 uint8_t* pixels = nullptr;
863 unsigned int buffer_size = 0; 863 unsigned int buffer_size = 0;
864 if (c.pixels_shm_id != 0) { 864 if (c.pixels_shm_id != 0) {
865 pixels = GetSharedMemoryAndSizeAs<uint8_t*>( 865 pixels = GetSharedMemoryAndSizeAs<uint8_t*>(
866 c.pixels_shm_id, c.pixels_shm_offset, &buffer_size); 866 c.pixels_shm_id, c.pixels_shm_offset, 0, &buffer_size);
867 if (!pixels) { 867 if (!pixels) {
868 return error::kOutOfBounds; 868 return error::kOutOfBounds;
869 } 869 }
870 } 870 }
871 871
872 GLsizei bufsize = buffer_size; 872 GLsizei bufsize = buffer_size;
873 GLsizei length = 0; 873 GLsizei length = 0;
874 int32_t success = 0; 874 int32_t success = 0;
875 error::Error error = DoReadPixels(x, y, width, height, format, type, bufsize, 875 error::Error error = DoReadPixels(x, y, width, height, format, type, bufsize,
876 &length, pixels, &success); 876 &length, pixels, &success);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 GLenum format = static_cast<GLenum>(c.format); 945 GLenum format = static_cast<GLenum>(c.format);
946 GLenum type = static_cast<GLenum>(c.type); 946 GLenum type = static_cast<GLenum>(c.type);
947 uint32_t pixels_shm_id = c.pixels_shm_id; 947 uint32_t pixels_shm_id = c.pixels_shm_id;
948 uint32_t pixels_shm_offset = c.pixels_shm_offset; 948 uint32_t pixels_shm_offset = c.pixels_shm_offset;
949 949
950 unsigned int buffer_size = 0; 950 unsigned int buffer_size = 0;
951 const void* pixels = nullptr; 951 const void* pixels = nullptr;
952 952
953 if (pixels_shm_id != 0 || pixels_shm_offset != 0) { 953 if (pixels_shm_id != 0 || pixels_shm_offset != 0) {
954 pixels = GetSharedMemoryAndSizeAs<uint8_t*>( 954 pixels = GetSharedMemoryAndSizeAs<uint8_t*>(
955 pixels_shm_id, pixels_shm_offset, &buffer_size); 955 pixels_shm_id, pixels_shm_offset, 0, &buffer_size);
956 if (!pixels) { 956 if (!pixels) {
957 return error::kOutOfBounds; 957 return error::kOutOfBounds;
958 } 958 }
959 } 959 }
960 960
961 error::Error error = 961 error::Error error =
962 DoTexImage2D(target, level, internal_format, width, height, border, 962 DoTexImage2D(target, level, internal_format, width, height, border,
963 format, type, buffer_size, pixels); 963 format, type, buffer_size, pixels);
964 if (error != error::kNoError) { 964 if (error != error::kNoError) {
965 return error; 965 return error;
(...skipping 17 matching lines...) Expand all
983 GLenum format = static_cast<GLenum>(c.format); 983 GLenum format = static_cast<GLenum>(c.format);
984 GLenum type = static_cast<GLenum>(c.type); 984 GLenum type = static_cast<GLenum>(c.type);
985 uint32_t pixels_shm_id = c.pixels_shm_id; 985 uint32_t pixels_shm_id = c.pixels_shm_id;
986 uint32_t pixels_shm_offset = c.pixels_shm_offset; 986 uint32_t pixels_shm_offset = c.pixels_shm_offset;
987 987
988 unsigned int buffer_size = 0; 988 unsigned int buffer_size = 0;
989 const void* pixels = nullptr; 989 const void* pixels = nullptr;
990 990
991 if (pixels_shm_id != 0 || pixels_shm_offset != 0) { 991 if (pixels_shm_id != 0 || pixels_shm_offset != 0) {
992 pixels = GetSharedMemoryAndSizeAs<uint8_t*>( 992 pixels = GetSharedMemoryAndSizeAs<uint8_t*>(
993 pixels_shm_id, pixels_shm_offset, &buffer_size); 993 pixels_shm_id, pixels_shm_offset, 0, &buffer_size);
994 if (!pixels) { 994 if (!pixels) {
995 return error::kOutOfBounds; 995 return error::kOutOfBounds;
996 } 996 }
997 } 997 }
998 998
999 error::Error error = 999 error::Error error =
1000 DoTexImage3D(target, level, internal_format, width, height, depth, border, 1000 DoTexImage3D(target, level, internal_format, width, height, depth, border,
1001 format, type, buffer_size, pixels); 1001 format, type, buffer_size, pixels);
1002 if (error != error::kNoError) { 1002 if (error != error::kNoError) {
1003 return error; 1003 return error;
(...skipping 16 matching lines...) Expand all
1020 GLenum format = static_cast<GLenum>(c.format); 1020 GLenum format = static_cast<GLenum>(c.format);
1021 GLenum type = static_cast<GLenum>(c.type); 1021 GLenum type = static_cast<GLenum>(c.type);
1022 uint32_t pixels_shm_id = c.pixels_shm_id; 1022 uint32_t pixels_shm_id = c.pixels_shm_id;
1023 uint32_t pixels_shm_offset = c.pixels_shm_offset; 1023 uint32_t pixels_shm_offset = c.pixels_shm_offset;
1024 1024
1025 unsigned int buffer_size = 0; 1025 unsigned int buffer_size = 0;
1026 const void* pixels = nullptr; 1026 const void* pixels = nullptr;
1027 1027
1028 if (pixels_shm_id != 0 || pixels_shm_offset != 0) { 1028 if (pixels_shm_id != 0 || pixels_shm_offset != 0) {
1029 pixels = GetSharedMemoryAndSizeAs<uint8_t*>( 1029 pixels = GetSharedMemoryAndSizeAs<uint8_t*>(
1030 pixels_shm_id, pixels_shm_offset, &buffer_size); 1030 pixels_shm_id, pixels_shm_offset, 0, &buffer_size);
1031 if (!pixels) { 1031 if (!pixels) {
1032 return error::kOutOfBounds; 1032 return error::kOutOfBounds;
1033 } 1033 }
1034 } 1034 }
1035 1035
1036 error::Error error = 1036 error::Error error =
1037 DoTexSubImage2D(target, level, xoffset, yoffset, width, height, format, 1037 DoTexSubImage2D(target, level, xoffset, yoffset, width, height, format,
1038 type, buffer_size, pixels); 1038 type, buffer_size, pixels);
1039 if (error != error::kNoError) { 1039 if (error != error::kNoError) {
1040 return error; 1040 return error;
(...skipping 18 matching lines...) Expand all
1059 GLenum format = static_cast<GLenum>(c.format); 1059 GLenum format = static_cast<GLenum>(c.format);
1060 GLenum type = static_cast<GLenum>(c.type); 1060 GLenum type = static_cast<GLenum>(c.type);
1061 uint32_t pixels_shm_id = c.pixels_shm_id; 1061 uint32_t pixels_shm_id = c.pixels_shm_id;
1062 uint32_t pixels_shm_offset = c.pixels_shm_offset; 1062 uint32_t pixels_shm_offset = c.pixels_shm_offset;
1063 1063
1064 unsigned int buffer_size = 0; 1064 unsigned int buffer_size = 0;
1065 const void* pixels = nullptr; 1065 const void* pixels = nullptr;
1066 1066
1067 if (pixels_shm_id != 0 || pixels_shm_offset != 0) { 1067 if (pixels_shm_id != 0 || pixels_shm_offset != 0) {
1068 pixels = GetSharedMemoryAndSizeAs<uint8_t*>( 1068 pixels = GetSharedMemoryAndSizeAs<uint8_t*>(
1069 pixels_shm_id, pixels_shm_offset, &buffer_size); 1069 pixels_shm_id, pixels_shm_offset, 0, &buffer_size);
1070 if (!pixels) { 1070 if (!pixels) {
1071 return error::kOutOfBounds; 1071 return error::kOutOfBounds;
1072 } 1072 }
1073 } 1073 }
1074 1074
1075 error::Error error = 1075 error::Error error =
1076 DoTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, 1076 DoTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height,
1077 depth, format, type, buffer_size, pixels); 1077 depth, format, type, buffer_size, pixels);
1078 if (error != error::kNoError) { 1078 if (error != error::kNoError) {
1079 return error; 1079 return error;
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 GLsizei num_coords = static_cast<GLsizei>(c.numCoords); 1896 GLsizei num_coords = static_cast<GLsizei>(c.numCoords);
1897 GLenum coord_type = static_cast<GLenum>(c.coordType); 1897 GLenum coord_type = static_cast<GLenum>(c.coordType);
1898 const GLvoid* coords = nullptr; 1898 const GLvoid* coords = nullptr;
1899 GLsizei coords_bufsize = 0; 1899 GLsizei coords_bufsize = 0;
1900 if (num_coords > 0) { 1900 if (num_coords > 0) {
1901 uint32_t coords_shm_id = static_cast<uint32_t>(c.coords_shm_id); 1901 uint32_t coords_shm_id = static_cast<uint32_t>(c.coords_shm_id);
1902 uint32_t coords_shm_offset = static_cast<uint32_t>(c.coords_shm_offset); 1902 uint32_t coords_shm_offset = static_cast<uint32_t>(c.coords_shm_offset);
1903 if (coords_shm_id != 0 || coords_shm_offset != 0) { 1903 if (coords_shm_id != 0 || coords_shm_offset != 0) {
1904 unsigned int memory_size = 0; 1904 unsigned int memory_size = 0;
1905 coords = GetSharedMemoryAndSizeAs<const GLvoid*>( 1905 coords = GetSharedMemoryAndSizeAs<const GLvoid*>(
1906 coords_shm_id, coords_shm_offset, &memory_size); 1906 coords_shm_id, coords_shm_offset, 0, &memory_size);
1907 coords_bufsize = static_cast<GLsizei>(memory_size); 1907 coords_bufsize = static_cast<GLsizei>(memory_size);
1908 } 1908 }
1909 1909
1910 if (!coords) { 1910 if (!coords) {
1911 return error::kOutOfBounds; 1911 return error::kOutOfBounds;
1912 } 1912 }
1913 } 1913 }
1914 1914
1915 error::Error error = 1915 error::Error error =
1916 DoPathCommandsCHROMIUM(path, num_commands, commands, num_coords, 1916 DoPathCommandsCHROMIUM(path, num_commands, commands, num_coords,
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2067 GLsizei num_paths = static_cast<GLsizei>(c.numPaths); 2067 GLsizei num_paths = static_cast<GLsizei>(c.numPaths);
2068 GLenum path_name_type = static_cast<GLuint>(c.pathNameType); 2068 GLenum path_name_type = static_cast<GLuint>(c.pathNameType);
2069 const GLvoid* paths = nullptr; 2069 const GLvoid* paths = nullptr;
2070 GLsizei paths_bufsize = 0; 2070 GLsizei paths_bufsize = 0;
2071 if (num_paths > 0) { 2071 if (num_paths > 0) {
2072 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id); 2072 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id);
2073 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset); 2073 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset);
2074 if (paths_shm_id != 0 || paths_shm_offset != 0) { 2074 if (paths_shm_id != 0 || paths_shm_offset != 0) {
2075 unsigned int memory_size = 0; 2075 unsigned int memory_size = 0;
2076 paths = GetSharedMemoryAndSizeAs<const GLvoid*>( 2076 paths = GetSharedMemoryAndSizeAs<const GLvoid*>(
2077 paths_shm_id, paths_shm_offset, &memory_size); 2077 paths_shm_id, paths_shm_offset, 0, &memory_size);
2078 paths_bufsize = static_cast<GLsizei>(memory_size); 2078 paths_bufsize = static_cast<GLsizei>(memory_size);
2079 } 2079 }
2080 2080
2081 if (!paths) { 2081 if (!paths) {
2082 return error::kOutOfBounds; 2082 return error::kOutOfBounds;
2083 } 2083 }
2084 } 2084 }
2085 GLuint path_base = static_cast<GLuint>(c.pathBase); 2085 GLuint path_base = static_cast<GLuint>(c.pathBase);
2086 GLenum fill_mode = static_cast<GLenum>(c.fillMode); 2086 GLenum fill_mode = static_cast<GLenum>(c.fillMode);
2087 GLuint mask = static_cast<GLuint>(c.mask); 2087 GLuint mask = static_cast<GLuint>(c.mask);
2088 GLenum transform_type = static_cast<GLuint>(c.transformType); 2088 GLenum transform_type = static_cast<GLuint>(c.transformType);
2089 const GLfloat* transform_values = nullptr; 2089 const GLfloat* transform_values = nullptr;
2090 GLsizei transform_values_bufsize = 0; 2090 GLsizei transform_values_bufsize = 0;
2091 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) { 2091 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) {
2092 unsigned int memory_size = 0; 2092 unsigned int memory_size = 0;
2093 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>( 2093 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>(
2094 c.transformValues_shm_id, c.transformValues_shm_offset, &memory_size); 2094 c.transformValues_shm_id, c.transformValues_shm_offset, 0,
2095 &memory_size);
2095 transform_values_bufsize = static_cast<GLsizei>(memory_size); 2096 transform_values_bufsize = static_cast<GLsizei>(memory_size);
2096 } 2097 }
2097 if (!transform_values) { 2098 if (!transform_values) {
2098 return error::kOutOfBounds; 2099 return error::kOutOfBounds;
2099 } 2100 }
2100 2101
2101 error::Error error = DoStencilFillPathInstancedCHROMIUM( 2102 error::Error error = DoStencilFillPathInstancedCHROMIUM(
2102 num_paths, path_name_type, paths, paths_bufsize, path_base, fill_mode, 2103 num_paths, path_name_type, paths, paths_bufsize, path_base, fill_mode,
2103 mask, transform_type, transform_values, transform_values_bufsize); 2104 mask, transform_type, transform_values, transform_values_bufsize);
2104 if (error != error::kNoError) { 2105 if (error != error::kNoError) {
(...skipping 14 matching lines...) Expand all
2119 GLsizei num_paths = static_cast<GLsizei>(c.numPaths); 2120 GLsizei num_paths = static_cast<GLsizei>(c.numPaths);
2120 GLenum path_name_type = static_cast<GLuint>(c.pathNameType); 2121 GLenum path_name_type = static_cast<GLuint>(c.pathNameType);
2121 const GLvoid* paths = nullptr; 2122 const GLvoid* paths = nullptr;
2122 GLsizei paths_bufsize = 0; 2123 GLsizei paths_bufsize = 0;
2123 if (num_paths > 0) { 2124 if (num_paths > 0) {
2124 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id); 2125 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id);
2125 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset); 2126 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset);
2126 if (paths_shm_id != 0 || paths_shm_offset != 0) { 2127 if (paths_shm_id != 0 || paths_shm_offset != 0) {
2127 unsigned int memory_size = 0; 2128 unsigned int memory_size = 0;
2128 paths = GetSharedMemoryAndSizeAs<const GLvoid*>( 2129 paths = GetSharedMemoryAndSizeAs<const GLvoid*>(
2129 paths_shm_id, paths_shm_offset, &memory_size); 2130 paths_shm_id, paths_shm_offset, 0, &memory_size);
2130 paths_bufsize = static_cast<GLsizei>(memory_size); 2131 paths_bufsize = static_cast<GLsizei>(memory_size);
2131 } 2132 }
2132 2133
2133 if (!paths) { 2134 if (!paths) {
2134 return error::kOutOfBounds; 2135 return error::kOutOfBounds;
2135 } 2136 }
2136 } 2137 }
2137 GLuint path_base = static_cast<GLuint>(c.pathBase); 2138 GLuint path_base = static_cast<GLuint>(c.pathBase);
2138 GLint reference = static_cast<GLint>(c.reference); 2139 GLint reference = static_cast<GLint>(c.reference);
2139 GLuint mask = static_cast<GLuint>(c.mask); 2140 GLuint mask = static_cast<GLuint>(c.mask);
2140 GLenum transform_type = static_cast<GLuint>(c.transformType); 2141 GLenum transform_type = static_cast<GLuint>(c.transformType);
2141 const GLfloat* transform_values = nullptr; 2142 const GLfloat* transform_values = nullptr;
2142 GLsizei transform_values_bufsize = 0; 2143 GLsizei transform_values_bufsize = 0;
2143 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) { 2144 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) {
2144 unsigned int memory_size = 0; 2145 unsigned int memory_size = 0;
2145 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>( 2146 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>(
2146 c.transformValues_shm_id, c.transformValues_shm_offset, &memory_size); 2147 c.transformValues_shm_id, c.transformValues_shm_offset, 0,
2148 &memory_size);
2147 transform_values_bufsize = static_cast<GLsizei>(memory_size); 2149 transform_values_bufsize = static_cast<GLsizei>(memory_size);
2148 } 2150 }
2149 if (!transform_values) { 2151 if (!transform_values) {
2150 return error::kOutOfBounds; 2152 return error::kOutOfBounds;
2151 } 2153 }
2152 2154
2153 error::Error error = DoStencilStrokePathInstancedCHROMIUM( 2155 error::Error error = DoStencilStrokePathInstancedCHROMIUM(
2154 num_paths, path_name_type, paths, paths_bufsize, path_base, reference, 2156 num_paths, path_name_type, paths, paths_bufsize, path_base, reference,
2155 mask, transform_type, transform_values, transform_values_bufsize); 2157 mask, transform_type, transform_values, transform_values_bufsize);
2156 if (error != error::kNoError) { 2158 if (error != error::kNoError) {
(...skipping 12 matching lines...) Expand all
2169 GLsizei num_paths = static_cast<GLsizei>(c.numPaths); 2171 GLsizei num_paths = static_cast<GLsizei>(c.numPaths);
2170 GLenum path_name_type = static_cast<GLuint>(c.pathNameType); 2172 GLenum path_name_type = static_cast<GLuint>(c.pathNameType);
2171 const GLvoid* paths = nullptr; 2173 const GLvoid* paths = nullptr;
2172 GLsizei paths_bufsize = 0; 2174 GLsizei paths_bufsize = 0;
2173 if (num_paths > 0) { 2175 if (num_paths > 0) {
2174 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id); 2176 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id);
2175 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset); 2177 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset);
2176 if (paths_shm_id != 0 || paths_shm_offset != 0) { 2178 if (paths_shm_id != 0 || paths_shm_offset != 0) {
2177 unsigned int memory_size = 0; 2179 unsigned int memory_size = 0;
2178 paths = GetSharedMemoryAndSizeAs<const GLvoid*>( 2180 paths = GetSharedMemoryAndSizeAs<const GLvoid*>(
2179 paths_shm_id, paths_shm_offset, &memory_size); 2181 paths_shm_id, paths_shm_offset, 0, &memory_size);
2180 paths_bufsize = static_cast<GLsizei>(memory_size); 2182 paths_bufsize = static_cast<GLsizei>(memory_size);
2181 } 2183 }
2182 2184
2183 if (!paths) { 2185 if (!paths) {
2184 return error::kOutOfBounds; 2186 return error::kOutOfBounds;
2185 } 2187 }
2186 } 2188 }
2187 GLuint path_base = static_cast<GLuint>(c.pathBase); 2189 GLuint path_base = static_cast<GLuint>(c.pathBase);
2188 GLenum cover_mode = static_cast<GLenum>(c.coverMode); 2190 GLenum cover_mode = static_cast<GLenum>(c.coverMode);
2189 GLenum transform_type = static_cast<GLuint>(c.transformType); 2191 GLenum transform_type = static_cast<GLuint>(c.transformType);
2190 const GLfloat* transform_values = nullptr; 2192 const GLfloat* transform_values = nullptr;
2191 GLsizei transform_values_bufsize = 0; 2193 GLsizei transform_values_bufsize = 0;
2192 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) { 2194 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) {
2193 unsigned int memory_size = 0; 2195 unsigned int memory_size = 0;
2194 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>( 2196 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>(
2195 c.transformValues_shm_id, c.transformValues_shm_offset, &memory_size); 2197 c.transformValues_shm_id, c.transformValues_shm_offset, 0,
2198 &memory_size);
2196 transform_values_bufsize = static_cast<GLsizei>(memory_size); 2199 transform_values_bufsize = static_cast<GLsizei>(memory_size);
2197 } 2200 }
2198 if (!transform_values) { 2201 if (!transform_values) {
2199 return error::kOutOfBounds; 2202 return error::kOutOfBounds;
2200 } 2203 }
2201 2204
2202 error::Error error = DoCoverFillPathInstancedCHROMIUM( 2205 error::Error error = DoCoverFillPathInstancedCHROMIUM(
2203 num_paths, path_name_type, paths, paths_bufsize, path_base, cover_mode, 2206 num_paths, path_name_type, paths, paths_bufsize, path_base, cover_mode,
2204 transform_type, transform_values, transform_values_bufsize); 2207 transform_type, transform_values, transform_values_bufsize);
2205 if (error != error::kNoError) { 2208 if (error != error::kNoError) {
(...skipping 14 matching lines...) Expand all
2220 GLsizei num_paths = static_cast<GLsizei>(c.numPaths); 2223 GLsizei num_paths = static_cast<GLsizei>(c.numPaths);
2221 GLenum path_name_type = static_cast<GLuint>(c.pathNameType); 2224 GLenum path_name_type = static_cast<GLuint>(c.pathNameType);
2222 const GLvoid* paths = nullptr; 2225 const GLvoid* paths = nullptr;
2223 GLsizei paths_bufsize = 0; 2226 GLsizei paths_bufsize = 0;
2224 if (num_paths > 0) { 2227 if (num_paths > 0) {
2225 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id); 2228 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id);
2226 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset); 2229 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset);
2227 if (paths_shm_id != 0 || paths_shm_offset != 0) { 2230 if (paths_shm_id != 0 || paths_shm_offset != 0) {
2228 unsigned int memory_size = 0; 2231 unsigned int memory_size = 0;
2229 paths = GetSharedMemoryAndSizeAs<const GLvoid*>( 2232 paths = GetSharedMemoryAndSizeAs<const GLvoid*>(
2230 paths_shm_id, paths_shm_offset, &memory_size); 2233 paths_shm_id, paths_shm_offset, 0, &memory_size);
2231 paths_bufsize = static_cast<GLsizei>(memory_size); 2234 paths_bufsize = static_cast<GLsizei>(memory_size);
2232 } 2235 }
2233 2236
2234 if (!paths) { 2237 if (!paths) {
2235 return error::kOutOfBounds; 2238 return error::kOutOfBounds;
2236 } 2239 }
2237 } 2240 }
2238 GLuint path_base = static_cast<GLuint>(c.pathBase); 2241 GLuint path_base = static_cast<GLuint>(c.pathBase);
2239 GLenum cover_mode = static_cast<GLenum>(c.coverMode); 2242 GLenum cover_mode = static_cast<GLenum>(c.coverMode);
2240 GLenum transform_type = static_cast<GLuint>(c.transformType); 2243 GLenum transform_type = static_cast<GLuint>(c.transformType);
2241 const GLfloat* transform_values = nullptr; 2244 const GLfloat* transform_values = nullptr;
2242 GLsizei transform_values_bufsize = 0; 2245 GLsizei transform_values_bufsize = 0;
2243 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) { 2246 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) {
2244 unsigned int memory_size = 0; 2247 unsigned int memory_size = 0;
2245 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>( 2248 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>(
2246 c.transformValues_shm_id, c.transformValues_shm_offset, &memory_size); 2249 c.transformValues_shm_id, c.transformValues_shm_offset, 0,
2250 &memory_size);
2247 transform_values_bufsize = static_cast<GLsizei>(memory_size); 2251 transform_values_bufsize = static_cast<GLsizei>(memory_size);
2248 } 2252 }
2249 if (!transform_values) { 2253 if (!transform_values) {
2250 return error::kOutOfBounds; 2254 return error::kOutOfBounds;
2251 } 2255 }
2252 2256
2253 error::Error error = DoCoverStrokePathInstancedCHROMIUM( 2257 error::Error error = DoCoverStrokePathInstancedCHROMIUM(
2254 num_paths, path_name_type, paths, paths_bufsize, path_base, cover_mode, 2258 num_paths, path_name_type, paths, paths_bufsize, path_base, cover_mode,
2255 transform_type, transform_values, transform_values_bufsize); 2259 transform_type, transform_values, transform_values_bufsize);
2256 if (error != error::kNoError) { 2260 if (error != error::kNoError) {
(...skipping 13 matching lines...) Expand all
2270 GLsizei num_paths = static_cast<GLsizei>(c.numPaths); 2274 GLsizei num_paths = static_cast<GLsizei>(c.numPaths);
2271 GLenum path_name_type = static_cast<GLuint>(c.pathNameType); 2275 GLenum path_name_type = static_cast<GLuint>(c.pathNameType);
2272 const GLvoid* paths = nullptr; 2276 const GLvoid* paths = nullptr;
2273 GLsizei paths_bufsize = 0; 2277 GLsizei paths_bufsize = 0;
2274 if (num_paths > 0) { 2278 if (num_paths > 0) {
2275 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id); 2279 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id);
2276 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset); 2280 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset);
2277 if (paths_shm_id != 0 || paths_shm_offset != 0) { 2281 if (paths_shm_id != 0 || paths_shm_offset != 0) {
2278 unsigned int memory_size = 0; 2282 unsigned int memory_size = 0;
2279 paths = GetSharedMemoryAndSizeAs<const GLvoid*>( 2283 paths = GetSharedMemoryAndSizeAs<const GLvoid*>(
2280 paths_shm_id, paths_shm_offset, &memory_size); 2284 paths_shm_id, paths_shm_offset, 0, &memory_size);
2281 paths_bufsize = static_cast<GLsizei>(memory_size); 2285 paths_bufsize = static_cast<GLsizei>(memory_size);
2282 } 2286 }
2283 2287
2284 if (!paths) { 2288 if (!paths) {
2285 return error::kOutOfBounds; 2289 return error::kOutOfBounds;
2286 } 2290 }
2287 } 2291 }
2288 GLuint path_base = static_cast<GLuint>(c.pathBase); 2292 GLuint path_base = static_cast<GLuint>(c.pathBase);
2289 GLenum cover_mode = static_cast<GLenum>(c.coverMode); 2293 GLenum cover_mode = static_cast<GLenum>(c.coverMode);
2290 GLenum fill_mode = static_cast<GLenum>(c.fillMode); 2294 GLenum fill_mode = static_cast<GLenum>(c.fillMode);
2291 GLuint mask = static_cast<GLuint>(c.mask); 2295 GLuint mask = static_cast<GLuint>(c.mask);
2292 GLenum transform_type = static_cast<GLuint>(c.transformType); 2296 GLenum transform_type = static_cast<GLuint>(c.transformType);
2293 const GLfloat* transform_values = nullptr; 2297 const GLfloat* transform_values = nullptr;
2294 GLsizei transform_values_bufsize = 0; 2298 GLsizei transform_values_bufsize = 0;
2295 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) { 2299 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) {
2296 unsigned int memory_size = 0; 2300 unsigned int memory_size = 0;
2297 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>( 2301 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>(
2298 c.transformValues_shm_id, c.transformValues_shm_offset, &memory_size); 2302 c.transformValues_shm_id, c.transformValues_shm_offset, 0,
2303 &memory_size);
2299 transform_values_bufsize = static_cast<GLsizei>(memory_size); 2304 transform_values_bufsize = static_cast<GLsizei>(memory_size);
2300 } 2305 }
2301 if (!transform_values) { 2306 if (!transform_values) {
2302 return error::kOutOfBounds; 2307 return error::kOutOfBounds;
2303 } 2308 }
2304 2309
2305 error::Error error = DoStencilThenCoverFillPathInstancedCHROMIUM( 2310 error::Error error = DoStencilThenCoverFillPathInstancedCHROMIUM(
2306 num_paths, path_name_type, paths, paths_bufsize, path_base, cover_mode, 2311 num_paths, path_name_type, paths, paths_bufsize, path_base, cover_mode,
2307 fill_mode, mask, transform_type, transform_values, 2312 fill_mode, mask, transform_type, transform_values,
2308 transform_values_bufsize); 2313 transform_values_bufsize);
(...skipping 14 matching lines...) Expand all
2323 GLsizei num_paths = static_cast<GLsizei>(c.numPaths); 2328 GLsizei num_paths = static_cast<GLsizei>(c.numPaths);
2324 GLenum path_name_type = static_cast<GLuint>(c.pathNameType); 2329 GLenum path_name_type = static_cast<GLuint>(c.pathNameType);
2325 const GLvoid* paths = nullptr; 2330 const GLvoid* paths = nullptr;
2326 GLsizei paths_bufsize = 0; 2331 GLsizei paths_bufsize = 0;
2327 if (num_paths > 0) { 2332 if (num_paths > 0) {
2328 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id); 2333 uint32_t paths_shm_id = static_cast<uint32_t>(c.paths_shm_id);
2329 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset); 2334 uint32_t paths_shm_offset = static_cast<uint32_t>(c.paths_shm_offset);
2330 if (paths_shm_id != 0 || paths_shm_offset != 0) { 2335 if (paths_shm_id != 0 || paths_shm_offset != 0) {
2331 unsigned int memory_size = 0; 2336 unsigned int memory_size = 0;
2332 paths = GetSharedMemoryAndSizeAs<const GLvoid*>( 2337 paths = GetSharedMemoryAndSizeAs<const GLvoid*>(
2333 paths_shm_id, paths_shm_offset, &memory_size); 2338 paths_shm_id, paths_shm_offset, 0, &memory_size);
2334 paths_bufsize = static_cast<GLsizei>(memory_size); 2339 paths_bufsize = static_cast<GLsizei>(memory_size);
2335 } 2340 }
2336 2341
2337 if (!paths) { 2342 if (!paths) {
2338 return error::kOutOfBounds; 2343 return error::kOutOfBounds;
2339 } 2344 }
2340 } 2345 }
2341 GLuint path_base = static_cast<GLuint>(c.pathBase); 2346 GLuint path_base = static_cast<GLuint>(c.pathBase);
2342 GLenum cover_mode = static_cast<GLenum>(c.coverMode); 2347 GLenum cover_mode = static_cast<GLenum>(c.coverMode);
2343 GLint reference = static_cast<GLint>(c.reference); 2348 GLint reference = static_cast<GLint>(c.reference);
2344 GLuint mask = static_cast<GLuint>(c.mask); 2349 GLuint mask = static_cast<GLuint>(c.mask);
2345 GLenum transform_type = static_cast<GLuint>(c.transformType); 2350 GLenum transform_type = static_cast<GLuint>(c.transformType);
2346 const GLfloat* transform_values = nullptr; 2351 const GLfloat* transform_values = nullptr;
2347 GLsizei transform_values_bufsize = 0; 2352 GLsizei transform_values_bufsize = 0;
2348 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) { 2353 if (c.transformValues_shm_id != 0 || c.transformValues_shm_offset != 0) {
2349 unsigned int memory_size = 0; 2354 unsigned int memory_size = 0;
2350 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>( 2355 transform_values = GetSharedMemoryAndSizeAs<const GLfloat*>(
2351 c.transformValues_shm_id, c.transformValues_shm_offset, &memory_size); 2356 c.transformValues_shm_id, c.transformValues_shm_offset, 0,
2357 &memory_size);
2352 transform_values_bufsize = static_cast<GLsizei>(memory_size); 2358 transform_values_bufsize = static_cast<GLsizei>(memory_size);
2353 } 2359 }
2354 if (!transform_values) { 2360 if (!transform_values) {
2355 return error::kOutOfBounds; 2361 return error::kOutOfBounds;
2356 } 2362 }
2357 2363
2358 error::Error error = DoStencilThenCoverStrokePathInstancedCHROMIUM( 2364 error::Error error = DoStencilThenCoverStrokePathInstancedCHROMIUM(
2359 num_paths, path_name_type, paths, paths_bufsize, path_base, cover_mode, 2365 num_paths, path_name_type, paths, paths_bufsize, path_base, cover_mode,
2360 reference, mask, transform_type, transform_values, 2366 reference, mask, transform_type, transform_values,
2361 transform_values_bufsize); 2367 transform_values_bufsize);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2402 cmd_data); 2408 cmd_data);
2403 GLint program = static_cast<GLint>(c.program); 2409 GLint program = static_cast<GLint>(c.program);
2404 GLint location = static_cast<GLint>(c.location); 2410 GLint location = static_cast<GLint>(c.location);
2405 GLenum gen_mode = static_cast<GLint>(c.genMode); 2411 GLenum gen_mode = static_cast<GLint>(c.genMode);
2406 GLint components = static_cast<GLint>(c.components); 2412 GLint components = static_cast<GLint>(c.components);
2407 const GLfloat* coeffs = nullptr; 2413 const GLfloat* coeffs = nullptr;
2408 GLsizei coeffs_bufsize = 0; 2414 GLsizei coeffs_bufsize = 0;
2409 if (c.coeffs_shm_id != 0 || c.coeffs_shm_offset != 0) { 2415 if (c.coeffs_shm_id != 0 || c.coeffs_shm_offset != 0) {
2410 unsigned int memory_size = 0; 2416 unsigned int memory_size = 0;
2411 coeffs = GetSharedMemoryAndSizeAs<const GLfloat*>( 2417 coeffs = GetSharedMemoryAndSizeAs<const GLfloat*>(
2412 c.coeffs_shm_id, c.coeffs_shm_offset, &memory_size); 2418 c.coeffs_shm_id, c.coeffs_shm_offset, 0, &memory_size);
2413 coeffs_bufsize = static_cast<GLsizei>(memory_size); 2419 coeffs_bufsize = static_cast<GLsizei>(memory_size);
2414 } 2420 }
2415 if (!coeffs) { 2421 if (!coeffs) {
2416 return error::kOutOfBounds; 2422 return error::kOutOfBounds;
2417 } 2423 }
2418 error::Error error = DoProgramPathFragmentInputGenCHROMIUM( 2424 error::Error error = DoProgramPathFragmentInputGenCHROMIUM(
2419 program, location, gen_mode, components, coeffs, coeffs_bufsize); 2425 program, location, gen_mode, components, coeffs, coeffs_bufsize);
2420 if (error != error::kNoError) { 2426 if (error != error::kNoError) {
2421 return error; 2427 return error;
2422 } 2428 }
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2673 // TODO(geofflang): Handle PIXEL_UNPACK_BUFFER case. 2679 // TODO(geofflang): Handle PIXEL_UNPACK_BUFFER case.
2674 const void* data = GetSharedMemoryAs<const void*>( 2680 const void* data = GetSharedMemoryAs<const void*>(
2675 c.data_shm_id, c.data_shm_offset, image_size); 2681 c.data_shm_id, c.data_shm_offset, image_size);
2676 return DoCompressedTexSubImage3D( 2682 return DoCompressedTexSubImage3D(
2677 target, level, xoffset, yoffset, zoffset, width, height, depth, 2683 target, level, xoffset, yoffset, zoffset, width, height, depth,
2678 format, image_size, data); 2684 format, image_size, data);
2679 } 2685 }
2680 2686
2681 } // namespace gles2 2687 } // namespace gles2
2682 } // namespace gpu 2688 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698