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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 .RetiresOnSaturation(); 1525 .RetiresOnSaturation();
1526 memcpy(shared_memory_address_, data, size); 1526 memcpy(shared_memory_address_, data, size);
1527 cmds::BufferSubData cmd; 1527 cmds::BufferSubData cmd;
1528 cmd.Init(target, offset, size, shared_memory_id_, shared_memory_offset_); 1528 cmd.Init(target, offset, size, shared_memory_id_, shared_memory_offset_);
1529 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1529 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1530 } 1530 }
1531 1531
1532 void GLES2DecoderTestBase::SetupVertexBuffer() { 1532 void GLES2DecoderTestBase::SetupVertexBuffer() {
1533 DoEnableVertexAttribArray(1); 1533 DoEnableVertexAttribArray(1);
1534 DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId); 1534 DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId);
1535 GLfloat f = 0; 1535 DoBufferData(GL_ARRAY_BUFFER, kNumVertices * 2 * sizeof(GLfloat));
1536 DoBufferData(GL_ARRAY_BUFFER, kNumVertices * 2 * sizeof(f));
1537 } 1536 }
1538 1537
1539 void GLES2DecoderTestBase::SetupAllNeededVertexBuffers() { 1538 void GLES2DecoderTestBase::SetupAllNeededVertexBuffers() {
1540 DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId); 1539 DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId);
1541 DoBufferData(GL_ARRAY_BUFFER, kNumVertices * 16 * sizeof(float)); 1540 DoBufferData(GL_ARRAY_BUFFER, kNumVertices * 16 * sizeof(float));
1542 DoEnableVertexAttribArray(0); 1541 DoEnableVertexAttribArray(0);
1543 DoEnableVertexAttribArray(1); 1542 DoEnableVertexAttribArray(1);
1544 DoEnableVertexAttribArray(2); 1543 DoEnableVertexAttribArray(2);
1545 DoVertexAttribPointer(0, 2, GL_FLOAT, 0, 0); 1544 DoVertexAttribPointer(0, 2, GL_FLOAT, 0, 0);
1546 DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0); 1545 DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1671 SetupDefaultProgram(); 1670 SetupDefaultProgram();
1672 } 1671 }
1673 1672
1674 // Include the auto-generated part of this file. We split this because it means 1673 // Include the auto-generated part of this file. We split this because it means
1675 // we can easily edit the non-auto generated parts right here in this file 1674 // we can easily edit the non-auto generated parts right here in this file
1676 // instead of having to edit some template or the code generator. 1675 // instead of having to edit some template or the code generator.
1677 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 1676 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
1678 1677
1679 } // namespace gles2 1678 } // namespace gles2
1680 } // namespace gpu 1679 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698