OLD | NEW |
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 "content/common/gpu/client/command_buffer_proxy_impl.h" | 5 #include "content/common/gpu/client/command_buffer_proxy_impl.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 route_id_, handle, &result, &capabilities_))) { | 152 route_id_, handle, &result, &capabilities_))) { |
153 LOG(ERROR) << "Could not send GpuCommandBufferMsg_Initialize."; | 153 LOG(ERROR) << "Could not send GpuCommandBufferMsg_Initialize."; |
154 return false; | 154 return false; |
155 } | 155 } |
156 | 156 |
157 if (!result) { | 157 if (!result) { |
158 LOG(ERROR) << "Failed to initialize command buffer service."; | 158 LOG(ERROR) << "Failed to initialize command buffer service."; |
159 return false; | 159 return false; |
160 } | 160 } |
161 | 161 |
162 capabilities_.map_image = true; | 162 capabilities_.image = true; |
163 | 163 |
164 return true; | 164 return true; |
165 } | 165 } |
166 | 166 |
167 gpu::CommandBuffer::State CommandBufferProxyImpl::GetLastState() { | 167 gpu::CommandBuffer::State CommandBufferProxyImpl::GetLastState() { |
168 return last_state_; | 168 return last_state_; |
169 } | 169 } |
170 | 170 |
171 int32 CommandBufferProxyImpl::GetLastToken() { | 171 int32 CommandBufferProxyImpl::GetLastToken() { |
172 TryUpdateState(); | 172 TryUpdateState(); |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 if (last_state_.error == gpu::error::kNoError) | 519 if (last_state_.error == gpu::error::kNoError) |
520 shared_state()->Read(&last_state_); | 520 shared_state()->Read(&last_state_); |
521 } | 521 } |
522 | 522 |
523 gpu::CommandBufferSharedState* CommandBufferProxyImpl::shared_state() const { | 523 gpu::CommandBufferSharedState* CommandBufferProxyImpl::shared_state() const { |
524 return reinterpret_cast<gpu::CommandBufferSharedState*>( | 524 return reinterpret_cast<gpu::CommandBufferSharedState*>( |
525 shared_state_shm_->memory()); | 525 shared_state_shm_->memory()); |
526 } | 526 } |
527 | 527 |
528 } // namespace content | 528 } // namespace content |
OLD | NEW |