| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/mus/gles2/command_buffer_local.h" | 5 #include "components/mus/gles2/command_buffer_local.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "components/mus/gles2/command_buffer_local_client.h" | 8 #include "components/mus/gles2/command_buffer_local_client.h" |
| 9 #include "components/mus/gles2/gpu_memory_tracker.h" | 9 #include "components/mus/gles2/gpu_memory_tracker.h" |
| 10 #include "components/mus/gles2/mojo_gpu_memory_buffer.h" | 10 #include "components/mus/gles2/mojo_gpu_memory_buffer.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 void CommandBufferLocal::SetLock(base::Lock* lock) { | 204 void CommandBufferLocal::SetLock(base::Lock* lock) { |
| 205 NOTIMPLEMENTED(); | 205 NOTIMPLEMENTED(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 bool CommandBufferLocal::IsGpuChannelLost() { | 208 bool CommandBufferLocal::IsGpuChannelLost() { |
| 209 // This is only possible for out-of-process command buffers. | 209 // This is only possible for out-of-process command buffers. |
| 210 return false; | 210 return false; |
| 211 } | 211 } |
| 212 | 212 |
| 213 gpu::CommandBufferNamespace CommandBufferLocal::GetNamespaceID() const { |
| 214 NOTIMPLEMENTED(); |
| 215 return gpu::CommandBufferNamespace::INVALID; |
| 216 } |
| 217 |
| 218 uint64_t CommandBufferLocal::GetCommandBufferID() const { |
| 219 NOTIMPLEMENTED(); |
| 220 return 0; |
| 221 } |
| 222 |
| 213 void CommandBufferLocal::PumpCommands() { | 223 void CommandBufferLocal::PumpCommands() { |
| 214 if (!decoder_->MakeCurrent()) { | 224 if (!decoder_->MakeCurrent()) { |
| 215 command_buffer_->SetContextLostReason(decoder_->GetContextLostReason()); | 225 command_buffer_->SetContextLostReason(decoder_->GetContextLostReason()); |
| 216 command_buffer_->SetParseError(::gpu::error::kLostContext); | 226 command_buffer_->SetParseError(::gpu::error::kLostContext); |
| 217 return; | 227 return; |
| 218 } | 228 } |
| 219 scheduler_->PutChanged(); | 229 scheduler_->PutChanged(); |
| 220 } | 230 } |
| 221 | 231 |
| 222 void CommandBufferLocal::OnResize(gfx::Size size, float scale_factor) { | 232 void CommandBufferLocal::OnResize(gfx::Size size, float scale_factor) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 251 void CommandBufferLocal::OnContextLost(uint32_t reason) { | 261 void CommandBufferLocal::OnContextLost(uint32_t reason) { |
| 252 if (client_) | 262 if (client_) |
| 253 client_->DidLoseContext(); | 263 client_->DidLoseContext(); |
| 254 } | 264 } |
| 255 | 265 |
| 256 void CommandBufferLocal::OnSyncPointRetired() { | 266 void CommandBufferLocal::OnSyncPointRetired() { |
| 257 scheduler_->SetScheduled(true); | 267 scheduler_->SetScheduled(true); |
| 258 } | 268 } |
| 259 | 269 |
| 260 } // namespace mus | 270 } // namespace mus |
| OLD | NEW |