| 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> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "mojo/gles2/gles2_context.h" | 10 #include "mojo/gles2/gles2_context.h" |
| 9 #include "mojo/gpu/mojo_gles2_impl_autogen.h" | 11 #include "mojo/gpu/mojo_gles2_impl_autogen.h" |
| 10 #include "mojo/public/cpp/environment/environment.h" | 12 #include "mojo/public/cpp/environment/environment.h" |
| 11 | 13 |
| 12 namespace mus { | 14 namespace mus { |
| 13 | 15 |
| 14 ContextProvider::ContextProvider( | 16 ContextProvider::ContextProvider( |
| 15 mojo::ScopedMessagePipeHandle command_buffer_handle) | 17 mojo::ScopedMessagePipeHandle command_buffer_handle) |
| 16 : command_buffer_handle_(std::move(command_buffer_handle)), | 18 : command_buffer_handle_(std::move(command_buffer_handle)), |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 60 |
| 59 ContextProvider::~ContextProvider() { | 61 ContextProvider::~ContextProvider() { |
| 60 context_gl_.reset(); | 62 context_gl_.reset(); |
| 61 if (context_) | 63 if (context_) |
| 62 MojoGLES2DestroyContext(context_); | 64 MojoGLES2DestroyContext(context_); |
| 63 } | 65 } |
| 64 | 66 |
| 65 void ContextProvider::ContextLost() {} | 67 void ContextProvider::ContextLost() {} |
| 66 | 68 |
| 67 } // namespace mus | 69 } // namespace mus |
| OLD | NEW |