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

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

Issue 1684343002: Upgrade TexSubImage3D and TexStorage3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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) 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_unittest_base.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 .RetiresOnSaturation(); 1243 .RetiresOnSaturation();
1244 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(bucket_id); 1244 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(bucket_id);
1245 bucket->SetSize(size); 1245 bucket->SetSize(size);
1246 cmds::CompressedTexImage2DBucket cmd; 1246 cmds::CompressedTexImage2DBucket cmd;
1247 cmd.Init( 1247 cmd.Init(
1248 target, level, format, width, height, 1248 target, level, format, width, height,
1249 bucket_id); 1249 bucket_id);
1250 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1250 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1251 } 1251 }
1252 1252
1253 void GLES2DecoderTestBase::DoTexImage3D(GLenum target,
1254 GLint level,
1255 GLenum internal_format,
1256 GLsizei width,
1257 GLsizei height,
1258 GLsizei depth,
1259 GLint border,
1260 GLenum format,
1261 GLenum type,
1262 uint32_t shared_memory_id,
1263 uint32_t shared_memory_offset) {
1264 EXPECT_CALL(*gl_, GetError())
1265 .WillOnce(Return(GL_NO_ERROR))
1266 .RetiresOnSaturation();
1267 EXPECT_CALL(*gl_, TexImage3D(target, level, internal_format,
1268 width, height, depth, border, format, type, _))
1269 .Times(1)
1270 .RetiresOnSaturation();
1271 EXPECT_CALL(*gl_, GetError())
1272 .WillOnce(Return(GL_NO_ERROR))
1273 .RetiresOnSaturation();
1274 cmds::TexImage3D cmd;
1275 cmd.Init(target, level, internal_format, width, height, depth, format, type,
1276 shared_memory_id, shared_memory_offset);
1277 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1278 }
1279
1253 void GLES2DecoderTestBase::DoRenderbufferStorage( 1280 void GLES2DecoderTestBase::DoRenderbufferStorage(
1254 GLenum target, GLenum internal_format, GLenum actual_format, 1281 GLenum target, GLenum internal_format, GLenum actual_format,
1255 GLsizei width, GLsizei height, GLenum error) { 1282 GLsizei width, GLsizei height, GLenum error) {
1256 EXPECT_CALL(*gl_, GetError()) 1283 EXPECT_CALL(*gl_, GetError())
1257 .WillOnce(Return(GL_NO_ERROR)) 1284 .WillOnce(Return(GL_NO_ERROR))
1258 .RetiresOnSaturation(); 1285 .RetiresOnSaturation();
1259 EXPECT_CALL(*gl_, RenderbufferStorageEXT( 1286 EXPECT_CALL(*gl_, RenderbufferStorageEXT(
1260 target, actual_format, width, height)) 1287 target, actual_format, width, height))
1261 .Times(1) 1288 .Times(1)
1262 .RetiresOnSaturation(); 1289 .RetiresOnSaturation();
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 SetupDefaultProgram(); 2039 SetupDefaultProgram();
2013 } 2040 }
2014 2041
2015 // Include the auto-generated part of this file. We split this because it means 2042 // Include the auto-generated part of this file. We split this because it means
2016 // we can easily edit the non-auto generated parts right here in this file 2043 // we can easily edit the non-auto generated parts right here in this file
2017 // instead of having to edit some template or the code generator. 2044 // instead of having to edit some template or the code generator.
2018 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 2045 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
2019 2046
2020 } // namespace gles2 2047 } // namespace gles2
2021 } // namespace gpu 2048 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698