OLD | NEW |
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 // Tests for the Command Buffer Helper. | 5 // Tests for the Command Buffer Helper. |
6 | 6 |
7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
8 #include "gpu/command_buffer/common/command_buffer.h" | 8 #include "gpu/command_buffer/common/command_buffer.h" |
9 #include "gpu/GLES2/gles2_command_buffer.h" | 9 #include "gpu/GLES2/gles2_command_buffer.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 | 44 |
45 virtual State GetState() { | 45 virtual State GetState() { |
46 return state_; | 46 return state_; |
47 } | 47 } |
48 | 48 |
49 virtual void Flush(int32 put_offset) { | 49 virtual void Flush(int32 put_offset) { |
50 state_.put_offset = put_offset; | 50 state_.put_offset = put_offset; |
51 } | 51 } |
52 | 52 |
53 virtual State FlushSync(int32 put_offset) { | 53 virtual State FlushSync(int32 put_offset, int32 last_known_get) { |
54 state_.put_offset = put_offset; | 54 state_.put_offset = put_offset; |
55 state_.get_offset = put_offset; | 55 state_.get_offset = put_offset; |
56 OnFlush(transfer_buffer_buffer_.ptr); | 56 OnFlush(transfer_buffer_buffer_.ptr); |
57 | 57 |
58 return state_; | 58 return state_; |
59 } | 59 } |
60 | 60 |
61 virtual void SetGetOffset(int32 get_offset) { | 61 virtual void SetGetOffset(int32 get_offset) { |
62 state_.get_offset = get_offset; | 62 state_.get_offset = get_offset; |
63 } | 63 } |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_ENUM), gl_->GetError()); | 973 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_ENUM), gl_->GetError()); |
974 const char* kPtr = "something"; | 974 const char* kPtr = "something"; |
975 gl_->UnmapTexSubImage2DCHROMIUM(kPtr); | 975 gl_->UnmapTexSubImage2DCHROMIUM(kPtr); |
976 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); | 976 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); |
977 } | 977 } |
978 | 978 |
979 } // namespace gles2 | 979 } // namespace gles2 |
980 } // namespace gpu | 980 } // namespace gpu |
981 | 981 |
982 | 982 |
OLD | NEW |