| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/public/cpp/context_provider.h" | 5 #include "components/mus/public/cpp/context_provider.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "mojo/gles2/gles2_context.h" | 10 #include "mojo/gles2/gles2_context.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 gpu::Capabilities capabilities; | 47 gpu::Capabilities capabilities; |
| 48 // Enabled the CHROMIUM_image extension to use GpuMemoryBuffers. The | 48 // Enabled the CHROMIUM_image extension to use GpuMemoryBuffers. The |
| 49 // implementation of which is used in CommandBufferDriver. | 49 // implementation of which is used in CommandBufferDriver. |
| 50 capabilities.image = true; | 50 capabilities.image = true; |
| 51 return capabilities; | 51 return capabilities; |
| 52 } | 52 } |
| 53 | 53 |
| 54 void ContextProvider::SetupLock() {} | 54 void ContextProvider::SetupLock() {} |
| 55 | 55 |
| 56 base::Lock* ContextProvider::GetLock() { | 56 base::Lock* ContextProvider::GetLock() { |
| 57 return &context_lock_; | 57 // This context provider is not used on multiple threads. |
| 58 NOTREACHED(); |
| 59 return nullptr; |
| 58 } | 60 } |
| 59 | 61 |
| 60 ContextProvider::~ContextProvider() { | 62 ContextProvider::~ContextProvider() { |
| 61 context_gl_.reset(); | 63 context_gl_.reset(); |
| 62 if (context_) | 64 if (context_) |
| 63 MojoGLES2DestroyContext(context_); | 65 MojoGLES2DestroyContext(context_); |
| 64 } | 66 } |
| 65 | 67 |
| 66 void ContextProvider::ContextLost() {} | 68 void ContextProvider::ContextLost() {} |
| 67 | 69 |
| 68 } // namespace mus | 70 } // namespace mus |
| OLD | NEW |