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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest.cc

Issue 6588029: Moved creation of GPU command buffer shared memory into the browser process.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/command_buffer_proxy.cc ('k') | gpu/command_buffer/common/command_buffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 15 matching lines...) Expand all
26 // CommandBuffer implementation: 26 // CommandBuffer implementation:
27 virtual bool Initialize(int32 size) { 27 virtual bool Initialize(int32 size) {
28 ring_buffer_.reset(new CommandBufferEntry[size]); 28 ring_buffer_.reset(new CommandBufferEntry[size]);
29 ring_buffer_buffer_.ptr = ring_buffer_.get(); 29 ring_buffer_buffer_.ptr = ring_buffer_.get();
30 ring_buffer_buffer_.size = size; 30 ring_buffer_buffer_.size = size;
31 state_.num_entries = size / sizeof(ring_buffer_[0]); 31 state_.num_entries = size / sizeof(ring_buffer_[0]);
32 state_.token = 10000; // All token checks in the tests should pass. 32 state_.token = 10000; // All token checks in the tests should pass.
33 return true; 33 return true;
34 } 34 }
35 35
36 virtual bool Initialize(base::SharedMemory* buffer, int32 size) {
37 GPU_NOTREACHED();
38 return false;
39 }
40
36 virtual Buffer GetRingBuffer() { 41 virtual Buffer GetRingBuffer() {
37 return ring_buffer_buffer_; 42 return ring_buffer_buffer_;
38 } 43 }
39 44
40 virtual State GetState() { 45 virtual State GetState() {
41 return state_; 46 return state_;
42 } 47 }
43 48
44 virtual void Flush(int32 put_offset) { 49 virtual void Flush(int32 put_offset) {
45 state_.put_offset = put_offset; 50 state_.put_offset = put_offset;
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_ENUM), gl_->GetError()); 972 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_ENUM), gl_->GetError());
968 const char* kPtr = "something"; 973 const char* kPtr = "something";
969 gl_->UnmapTexSubImage2DCHROMIUM(kPtr); 974 gl_->UnmapTexSubImage2DCHROMIUM(kPtr);
970 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); 975 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError());
971 } 976 }
972 977
973 } // namespace gles2 978 } // namespace gles2
974 } // namespace gpu 979 } // namespace gpu
975 980
976 981
OLDNEW
« no previous file with comments | « chrome/renderer/command_buffer_proxy.cc ('k') | gpu/command_buffer/common/command_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698