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

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

Issue 2182443003: WebGL 2: Fix bugs in negativetextureapi.html for Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small change Created 4 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" 9 #include "gpu/command_buffer/common/gles2_cmd_format.h"
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 cmds::LinkProgram link_cmd; 108 cmds::LinkProgram link_cmd;
109 link_cmd.Init(client_program_id_); 109 link_cmd.Init(client_program_id_);
110 EXPECT_EQ(error::kNoError, ExecuteCmd(link_cmd)); 110 EXPECT_EQ(error::kNoError, ExecuteCmd(link_cmd));
111 111
112 EXPECT_CALL(*gl_, 112 EXPECT_CALL(*gl_,
113 GetProgramiv(kServiceProgramId, GL_INFO_LOG_LENGTH, _)) 113 GetProgramiv(kServiceProgramId, GL_INFO_LOG_LENGTH, _))
114 .WillOnce(SetArgumentPointee<2>(0)) 114 .WillOnce(SetArgumentPointee<2>(0))
115 .RetiresOnSaturation(); 115 .RetiresOnSaturation();
116 }; 116 };
117 117
118 template <>
119 void GLES2DecoderTestBase::SpecializedSetup<cmds::CopyTexSubImage3D, 0>(
qiankun 2016/07/27 13:56:26 What's this setup used for?
Zhenyao Mo 2016/07/27 17:38:29 I don't think this is necessary. For the manually
yunchao 2016/07/27 23:46:11 That's true. This code snippet is not necessary.
120 bool valid) {
121 if (valid) {
122 DoBindTexture(GL_TEXTURE_3D, client_texture_id_, kServiceTextureId);
123 DoTexImage3D(
124 GL_TEXTURE_3D, 1, GL_RGBA8, 2, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE,
125 kSharedMemoryId, kSharedMemoryOffset);
126 }
127 };
128
118 TEST_P(GLES2DecoderTest3, TraceBeginCHROMIUM) { 129 TEST_P(GLES2DecoderTest3, TraceBeginCHROMIUM) {
119 const uint32_t kCategoryBucketId = 123; 130 const uint32_t kCategoryBucketId = 123;
120 const uint32_t kNameBucketId = 234; 131 const uint32_t kNameBucketId = 234;
121 132
122 const char kCategory[] = "test_category"; 133 const char kCategory[] = "test_category";
123 const char kName[] = "test_command"; 134 const char kName[] = "test_command";
124 SetBucketAsCString(kCategoryBucketId, kCategory); 135 SetBucketAsCString(kCategoryBucketId, kCategory);
125 SetBucketAsCString(kNameBucketId, kName); 136 SetBucketAsCString(kNameBucketId, kName);
126 137
127 TraceBeginCHROMIUM begin_cmd; 138 TraceBeginCHROMIUM begin_cmd;
(...skipping 22 matching lines...) Expand all
150 161
151 end_cmd.Init(); 162 end_cmd.Init();
152 EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); 163 EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd));
153 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 164 EXPECT_EQ(GL_NO_ERROR, GetGLError());
154 } 165 }
155 166
156 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h" 167 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h"
157 168
158 } // namespace gles2 169 } // namespace gles2
159 } // namespace gpu 170 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698