OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
7 #include "base/command_line.h" | 10 #include "base/command_line.h" |
8 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 12 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 13 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
11 #include "gpu/command_buffer/common/id_allocator.h" | 14 #include "gpu/command_buffer/common/id_allocator.h" |
12 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 15 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
13 #include "gpu/command_buffer/service/context_group.h" | 16 #include "gpu/command_buffer/service/context_group.h" |
14 #include "gpu/command_buffer/service/context_state.h" | 17 #include "gpu/command_buffer/service/context_state.h" |
15 #include "gpu/command_buffer/service/gl_surface_mock.h" | 18 #include "gpu/command_buffer/service/gl_surface_mock.h" |
16 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" | 19 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 .RetiresOnSaturation(); | 696 .RetiresOnSaturation(); |
694 CopyTexImage2D cmd; | 697 CopyTexImage2D cmd; |
695 cmd.Init(target, level, internal_format, 0, 0, width, height); | 698 cmd.Init(target, level, internal_format, 0, 0, width, height); |
696 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 699 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
697 EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); | 700 EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); |
698 EXPECT_FALSE( | 701 EXPECT_FALSE( |
699 texture->GetLevelSize(GL_TEXTURE_2D, level, &width, &height, nullptr)); | 702 texture->GetLevelSize(GL_TEXTURE_2D, level, &width, &height, nullptr)); |
700 } | 703 } |
701 | 704 |
702 TEST_P(GLES3DecoderTest, CompressedTexImage3DBucket) { | 705 TEST_P(GLES3DecoderTest, CompressedTexImage3DBucket) { |
703 const uint32 kBucketId = 123; | 706 const uint32_t kBucketId = 123; |
704 const uint32 kBadBucketId = 99; | 707 const uint32_t kBadBucketId = 99; |
705 const GLenum kTarget = GL_TEXTURE_2D_ARRAY; | 708 const GLenum kTarget = GL_TEXTURE_2D_ARRAY; |
706 const GLint kLevel = 0; | 709 const GLint kLevel = 0; |
707 const GLenum kInternalFormat = GL_COMPRESSED_R11_EAC; | 710 const GLenum kInternalFormat = GL_COMPRESSED_R11_EAC; |
708 const GLsizei kWidth = 4; | 711 const GLsizei kWidth = 4; |
709 const GLsizei kHeight = 4; | 712 const GLsizei kHeight = 4; |
710 const GLsizei kDepth = 4; | 713 const GLsizei kDepth = 4; |
711 const GLint kBorder = 0; | 714 const GLint kBorder = 0; |
712 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); | 715 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); |
713 ASSERT_TRUE(bucket != NULL); | 716 ASSERT_TRUE(bucket != NULL); |
714 const GLsizei kImageSize = 32; | 717 const GLsizei kImageSize = 32; |
(...skipping 25 matching lines...) Expand all Loading... |
740 .RetiresOnSaturation(); | 743 .RetiresOnSaturation(); |
741 EXPECT_CALL(*gl_, GetError()) | 744 EXPECT_CALL(*gl_, GetError()) |
742 .WillOnce(Return(GL_NO_ERROR)) | 745 .WillOnce(Return(GL_NO_ERROR)) |
743 .WillOnce(Return(GL_NO_ERROR)) | 746 .WillOnce(Return(GL_NO_ERROR)) |
744 .RetiresOnSaturation(); | 747 .RetiresOnSaturation(); |
745 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 748 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
746 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 749 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
747 } | 750 } |
748 | 751 |
749 TEST_P(GLES2DecoderTest, CompressedTexImage3DFailsOnES2) { | 752 TEST_P(GLES2DecoderTest, CompressedTexImage3DFailsOnES2) { |
750 const uint32 kBucketId = 123; | 753 const uint32_t kBucketId = 123; |
751 const GLenum kTarget = GL_TEXTURE_2D_ARRAY; | 754 const GLenum kTarget = GL_TEXTURE_2D_ARRAY; |
752 const GLint kLevel = 0; | 755 const GLint kLevel = 0; |
753 const GLenum kInternalFormat = GL_COMPRESSED_R11_EAC; | 756 const GLenum kInternalFormat = GL_COMPRESSED_R11_EAC; |
754 const GLsizei kWidth = 4; | 757 const GLsizei kWidth = 4; |
755 const GLsizei kHeight = 4; | 758 const GLsizei kHeight = 4; |
756 const GLsizei kDepth = 4; | 759 const GLsizei kDepth = 4; |
757 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); | 760 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); |
758 ASSERT_TRUE(bucket != NULL); | 761 ASSERT_TRUE(bucket != NULL); |
759 const GLsizei kImageSize = 32; | 762 const GLsizei kImageSize = 32; |
760 bucket->SetSize(kImageSize); | 763 bucket->SetSize(kImageSize); |
(...skipping 18 matching lines...) Expand all Loading... |
779 kWidth, | 782 kWidth, |
780 kHeight, | 783 kHeight, |
781 kDepth, | 784 kDepth, |
782 kInternalFormat, | 785 kInternalFormat, |
783 kBucketId); | 786 kBucketId); |
784 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); | 787 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); |
785 } | 788 } |
786 } | 789 } |
787 | 790 |
788 TEST_P(GLES3DecoderTest, CompressedTexImage3DFailsWithBadImageSize) { | 791 TEST_P(GLES3DecoderTest, CompressedTexImage3DFailsWithBadImageSize) { |
789 const uint32 kBucketId = 123; | 792 const uint32_t kBucketId = 123; |
790 const GLenum kTarget = GL_TEXTURE_2D_ARRAY; | 793 const GLenum kTarget = GL_TEXTURE_2D_ARRAY; |
791 const GLint kLevel = 0; | 794 const GLint kLevel = 0; |
792 const GLenum kInternalFormat = GL_COMPRESSED_RGBA8_ETC2_EAC; | 795 const GLenum kInternalFormat = GL_COMPRESSED_RGBA8_ETC2_EAC; |
793 const GLsizei kWidth = 4; | 796 const GLsizei kWidth = 4; |
794 const GLsizei kHeight = 8; | 797 const GLsizei kHeight = 8; |
795 const GLsizei kDepth = 4; | 798 const GLsizei kDepth = 4; |
796 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); | 799 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); |
797 ASSERT_TRUE(bucket != NULL); | 800 ASSERT_TRUE(bucket != NULL); |
798 const GLsizei kBadImageSize = 64; | 801 const GLsizei kBadImageSize = 64; |
799 bucket->SetSize(kBadImageSize); | 802 bucket->SetSize(kBadImageSize); |
800 | 803 |
801 DoBindTexture(kTarget, client_texture_id_, kServiceTextureId); | 804 DoBindTexture(kTarget, client_texture_id_, kServiceTextureId); |
802 | 805 |
803 CompressedTexImage3DBucket cmd; | 806 CompressedTexImage3DBucket cmd; |
804 cmd.Init(kTarget, | 807 cmd.Init(kTarget, |
805 kLevel, | 808 kLevel, |
806 kInternalFormat, | 809 kInternalFormat, |
807 kWidth, | 810 kWidth, |
808 kHeight, | 811 kHeight, |
809 kDepth, | 812 kDepth, |
810 kBucketId); | 813 kBucketId); |
811 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 814 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
812 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); | 815 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); |
813 } | 816 } |
814 | 817 |
815 TEST_P(GLES3DecoderTest, CompressedTexSubImage3DFails) { | 818 TEST_P(GLES3DecoderTest, CompressedTexSubImage3DFails) { |
816 const uint32 kBucketId = 123; | 819 const uint32_t kBucketId = 123; |
817 const GLenum kTarget = GL_TEXTURE_2D_ARRAY; | 820 const GLenum kTarget = GL_TEXTURE_2D_ARRAY; |
818 const GLint kLevel = 0; | 821 const GLint kLevel = 0; |
819 const GLenum kInternalFormat = GL_COMPRESSED_RGBA8_ETC2_EAC; | 822 const GLenum kInternalFormat = GL_COMPRESSED_RGBA8_ETC2_EAC; |
820 const GLsizei kWidth = 4; | 823 const GLsizei kWidth = 4; |
821 const GLsizei kHeight = 8; | 824 const GLsizei kHeight = 8; |
822 const GLsizei kDepth = 4; | 825 const GLsizei kDepth = 4; |
823 const GLint kBorder = 0; | 826 const GLint kBorder = 0; |
824 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); | 827 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); |
825 ASSERT_TRUE(bucket != NULL); | 828 ASSERT_TRUE(bucket != NULL); |
826 const GLsizei kImageSize = 128; | 829 const GLsizei kImageSize = 128; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 kSubHeight + 3, | 948 kSubHeight + 3, |
946 kSubDepth, | 949 kSubDepth, |
947 kFormat, | 950 kFormat, |
948 kBucketId); | 951 kBucketId); |
949 const GLsizei kSubImageSize2 = 128; | 952 const GLsizei kSubImageSize2 = 128; |
950 bucket->SetSize(kSubImageSize2); | 953 bucket->SetSize(kSubImageSize2); |
951 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 954 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
952 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); | 955 EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); |
953 | 956 |
954 // Bad bucket id. | 957 // Bad bucket id. |
955 const uint32 kBadBucketId = 444; | 958 const uint32_t kBadBucketId = 444; |
956 cmd.Init(kTarget, | 959 cmd.Init(kTarget, |
957 kLevel, | 960 kLevel, |
958 kXOffset, | 961 kXOffset, |
959 kYOffset, | 962 kYOffset, |
960 kZOffset, | 963 kZOffset, |
961 kSubWidth, | 964 kSubWidth, |
962 kSubHeight, | 965 kSubHeight, |
963 kSubDepth, | 966 kSubDepth, |
964 kFormat, | 967 kFormat, |
965 kBadBucketId); | 968 kBadBucketId); |
966 bucket->SetSize(kSubImageSize); | 969 bucket->SetSize(kSubImageSize); |
967 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); | 970 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); |
968 } | 971 } |
969 | 972 |
970 TEST_P(GLES2DecoderManualInitTest, CompressedTexImage2DBucketBadBucket) { | 973 TEST_P(GLES2DecoderManualInitTest, CompressedTexImage2DBucketBadBucket) { |
971 InitState init; | 974 InitState init; |
972 init.extensions = "GL_EXT_texture_compression_s3tc"; | 975 init.extensions = "GL_EXT_texture_compression_s3tc"; |
973 init.bind_generates_resource = true; | 976 init.bind_generates_resource = true; |
974 InitDecoder(init); | 977 InitDecoder(init); |
975 | 978 |
976 const uint32 kBadBucketId = 123; | 979 const uint32_t kBadBucketId = 123; |
977 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); | 980 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); |
978 CompressedTexImage2DBucket cmd; | 981 CompressedTexImage2DBucket cmd; |
979 cmd.Init(GL_TEXTURE_2D, | 982 cmd.Init(GL_TEXTURE_2D, |
980 0, | 983 0, |
981 GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, | 984 GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, |
982 4, | 985 4, |
983 4, | 986 4, |
984 kBadBucketId); | 987 kBadBucketId); |
985 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); | 988 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); |
986 CompressedTexSubImage2DBucket cmd2; | 989 CompressedTexSubImage2DBucket cmd2; |
(...skipping 15 matching lines...) Expand all Loading... |
1002 size_t block_size; | 1005 size_t block_size; |
1003 }; | 1006 }; |
1004 | 1007 |
1005 } // anonymous namespace. | 1008 } // anonymous namespace. |
1006 | 1009 |
1007 TEST_P(GLES2DecoderManualInitTest, CompressedTexImage2DS3TC) { | 1010 TEST_P(GLES2DecoderManualInitTest, CompressedTexImage2DS3TC) { |
1008 InitState init; | 1011 InitState init; |
1009 init.extensions = "GL_EXT_texture_compression_s3tc"; | 1012 init.extensions = "GL_EXT_texture_compression_s3tc"; |
1010 init.bind_generates_resource = true; | 1013 init.bind_generates_resource = true; |
1011 InitDecoder(init); | 1014 InitDecoder(init); |
1012 const uint32 kBucketId = 123; | 1015 const uint32_t kBucketId = 123; |
1013 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); | 1016 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); |
1014 ASSERT_TRUE(bucket != NULL); | 1017 ASSERT_TRUE(bucket != NULL); |
1015 | 1018 |
1016 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); | 1019 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); |
1017 | 1020 |
1018 static const S3TCTestData test_data[] = { | 1021 static const S3TCTestData test_data[] = { |
1019 { | 1022 { |
1020 GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 8, | 1023 GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 8, |
1021 }, | 1024 }, |
1022 { | 1025 { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 } | 1163 } |
1161 } | 1164 } |
1162 } | 1165 } |
1163 | 1166 |
1164 TEST_P(GLES2DecoderManualInitTest, CompressedTexImage2DETC1) { | 1167 TEST_P(GLES2DecoderManualInitTest, CompressedTexImage2DETC1) { |
1165 InitState init; | 1168 InitState init; |
1166 init.extensions = "GL_OES_compressed_ETC1_RGB8_texture"; | 1169 init.extensions = "GL_OES_compressed_ETC1_RGB8_texture"; |
1167 init.gl_version = "opengl es 2.0"; | 1170 init.gl_version = "opengl es 2.0"; |
1168 init.bind_generates_resource = true; | 1171 init.bind_generates_resource = true; |
1169 InitDecoder(init); | 1172 InitDecoder(init); |
1170 const uint32 kBucketId = 123; | 1173 const uint32_t kBucketId = 123; |
1171 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); | 1174 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(kBucketId); |
1172 ASSERT_TRUE(bucket != NULL); | 1175 ASSERT_TRUE(bucket != NULL); |
1173 | 1176 |
1174 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); | 1177 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); |
1175 | 1178 |
1176 const GLenum kFormat = GL_ETC1_RGB8_OES; | 1179 const GLenum kFormat = GL_ETC1_RGB8_OES; |
1177 const size_t kBlockSize = 8; | 1180 const size_t kBlockSize = 8; |
1178 | 1181 |
1179 CompressedTexImage2DBucket cmd; | 1182 CompressedTexImage2DBucket cmd; |
1180 // test small width. | 1183 // test small width. |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 result->size = 0; | 1281 result->size = 0; |
1279 GetIntegerv cmd; | 1282 GetIntegerv cmd; |
1280 cmd.Init(GL_TEXTURE_BINDING_EXTERNAL_OES, | 1283 cmd.Init(GL_TEXTURE_BINDING_EXTERNAL_OES, |
1281 shared_memory_id_, | 1284 shared_memory_id_, |
1282 shared_memory_offset_); | 1285 shared_memory_offset_); |
1283 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 1286 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
1284 EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( | 1287 EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( |
1285 GL_TEXTURE_BINDING_EXTERNAL_OES), | 1288 GL_TEXTURE_BINDING_EXTERNAL_OES), |
1286 result->GetNumResults()); | 1289 result->GetNumResults()); |
1287 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 1290 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
1288 EXPECT_EQ(client_texture_id_, (uint32)result->GetData()[0]); | 1291 EXPECT_EQ(client_texture_id_, (uint32_t)result->GetData()[0]); |
1289 } | 1292 } |
1290 | 1293 |
1291 TEST_P(GLES2DecoderManualInitTest, EGLImageExternalTextureDefaults) { | 1294 TEST_P(GLES2DecoderManualInitTest, EGLImageExternalTextureDefaults) { |
1292 InitState init; | 1295 InitState init; |
1293 init.extensions = "GL_OES_EGL_image_external"; | 1296 init.extensions = "GL_OES_EGL_image_external"; |
1294 init.gl_version = "opengl es 2.0"; | 1297 init.gl_version = "opengl es 2.0"; |
1295 init.bind_generates_resource = true; | 1298 init.bind_generates_resource = true; |
1296 InitDecoder(init); | 1299 InitDecoder(init); |
1297 DoBindTexture(GL_TEXTURE_EXTERNAL_OES, client_texture_id_, kServiceTextureId); | 1300 DoBindTexture(GL_TEXTURE_EXTERNAL_OES, client_texture_id_, kServiceTextureId); |
1298 | 1301 |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 result->size = 0; | 1686 result->size = 0; |
1684 GetIntegerv cmd; | 1687 GetIntegerv cmd; |
1685 cmd.Init(GL_TEXTURE_BINDING_RECTANGLE_ARB, | 1688 cmd.Init(GL_TEXTURE_BINDING_RECTANGLE_ARB, |
1686 shared_memory_id_, | 1689 shared_memory_id_, |
1687 shared_memory_offset_); | 1690 shared_memory_offset_); |
1688 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 1691 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
1689 EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( | 1692 EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( |
1690 GL_TEXTURE_BINDING_RECTANGLE_ARB), | 1693 GL_TEXTURE_BINDING_RECTANGLE_ARB), |
1691 result->GetNumResults()); | 1694 result->GetNumResults()); |
1692 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 1695 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
1693 EXPECT_EQ(client_texture_id_, (uint32)result->GetData()[0]); | 1696 EXPECT_EQ(client_texture_id_, (uint32_t)result->GetData()[0]); |
1694 } | 1697 } |
1695 | 1698 |
1696 TEST_P(GLES2DecoderManualInitTest, ARBTextureRectangleTextureDefaults) { | 1699 TEST_P(GLES2DecoderManualInitTest, ARBTextureRectangleTextureDefaults) { |
1697 InitState init; | 1700 InitState init; |
1698 init.extensions = "GL_ARB_texture_rectangle"; | 1701 init.extensions = "GL_ARB_texture_rectangle"; |
1699 init.bind_generates_resource = true; | 1702 init.bind_generates_resource = true; |
1700 InitDecoder(init); | 1703 InitDecoder(init); |
1701 DoBindTexture( | 1704 DoBindTexture( |
1702 GL_TEXTURE_RECTANGLE_ARB, client_texture_id_, kServiceTextureId); | 1705 GL_TEXTURE_RECTANGLE_ARB, client_texture_id_, kServiceTextureId); |
1703 | 1706 |
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2859 GL_UNSIGNED_BYTE, | 2862 GL_UNSIGNED_BYTE, |
2860 kSharedMemoryId, | 2863 kSharedMemoryId, |
2861 kSharedMemoryOffset); | 2864 kSharedMemoryOffset); |
2862 | 2865 |
2863 TextureRef* texture_ref = | 2866 TextureRef* texture_ref = |
2864 group().texture_manager()->GetTexture(client_texture_id_); | 2867 group().texture_manager()->GetTexture(client_texture_id_); |
2865 ASSERT_TRUE(texture_ref != NULL); | 2868 ASSERT_TRUE(texture_ref != NULL); |
2866 Texture* texture = texture_ref->texture(); | 2869 Texture* texture = texture_ref->texture(); |
2867 EXPECT_EQ(kServiceTextureId, texture->service_id()); | 2870 EXPECT_EQ(kServiceTextureId, texture->service_id()); |
2868 | 2871 |
2869 const int32 kImageId = 1; | 2872 const int32_t kImageId = 1; |
2870 scoped_refptr<MockGLImage> image(new MockGLImage); | 2873 scoped_refptr<MockGLImage> image(new MockGLImage); |
2871 GetImageManager()->AddImage(image.get(), kImageId); | 2874 GetImageManager()->AddImage(image.get(), kImageId); |
2872 | 2875 |
2873 // Bind image to texture. | 2876 // Bind image to texture. |
2874 EXPECT_CALL(*image.get(), BindTexImage(GL_TEXTURE_2D)) | 2877 EXPECT_CALL(*image.get(), BindTexImage(GL_TEXTURE_2D)) |
2875 .Times(1) | 2878 .Times(1) |
2876 .WillOnce(Return(false)) | 2879 .WillOnce(Return(false)) |
2877 .RetiresOnSaturation(); | 2880 .RetiresOnSaturation(); |
2878 EXPECT_CALL(*image.get(), GetSize()) | 2881 EXPECT_CALL(*image.get(), GetSize()) |
2879 .Times(1) | 2882 .Times(1) |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3364 // TODO(gman): CompressedTexSubImage2DImmediate | 3367 // TODO(gman): CompressedTexSubImage2DImmediate |
3365 | 3368 |
3366 // TODO(gman): TexImage2D | 3369 // TODO(gman): TexImage2D |
3367 | 3370 |
3368 // TODO(gman): TexImage2DImmediate | 3371 // TODO(gman): TexImage2DImmediate |
3369 | 3372 |
3370 // TODO(gman): TexSubImage2DImmediate | 3373 // TODO(gman): TexSubImage2DImmediate |
3371 | 3374 |
3372 } // namespace gles2 | 3375 } // namespace gles2 |
3373 } // namespace gpu | 3376 } // namespace gpu |
OLD | NEW |