OLD | NEW |
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 #include "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "gpu/command_buffer/service/gpu_processor.h" | 6 #include "gpu/command_buffer/service/gpu_processor.h" |
7 | 7 |
8 using ::base::SharedMemory; | 8 using ::base::SharedMemory; |
9 | 9 |
10 namespace gpu { | 10 namespace gpu { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 | 74 |
75 Buffer GPUProcessor::GetSharedMemoryBuffer(int32 shm_id) { | 75 Buffer GPUProcessor::GetSharedMemoryBuffer(int32 shm_id) { |
76 return command_buffer_->GetTransferBuffer(shm_id); | 76 return command_buffer_->GetTransferBuffer(shm_id); |
77 } | 77 } |
78 | 78 |
79 void GPUProcessor::set_token(int32 token) { | 79 void GPUProcessor::set_token(int32 token) { |
80 command_buffer_->SetToken(token); | 80 command_buffer_->SetToken(token); |
81 } | 81 } |
82 | 82 |
| 83 bool GPUProcessor::SetGetOffset(int32 offset) { |
| 84 if (parser_->set_get(offset)) { |
| 85 command_buffer_->SetGetOffset(static_cast<int32>(parser_->get())); |
| 86 return true; |
| 87 } |
| 88 return false; |
| 89 } |
| 90 |
| 91 int32 GPUProcessor::GetGetOffset() { |
| 92 return parser_->get(); |
| 93 } |
| 94 |
83 } // namespace gpu | 95 } // namespace gpu |
OLD | NEW |