| 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/surfaces/surfaces_context_provider.h" | 5 #include "components/view_manager/surfaces/surfaces_context_provider.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "third_party/mojo/src/mojo/public/cpp/environment/environment.h" | 8 #include "third_party/mojo/src/mojo/public/cpp/environment/environment.h" |
| 9 | 9 |
| 10 namespace surfaces { | 10 namespace surfaces { |
| 11 | 11 |
| 12 SurfacesContextProvider::SurfacesContextProvider( | 12 SurfacesContextProvider::SurfacesContextProvider( |
| 13 mojo::ScopedMessagePipeHandle command_buffer_handle) | 13 mojo::ScopedMessagePipeHandle command_buffer_handle) |
| 14 : command_buffer_handle_(command_buffer_handle.Pass()), | 14 : command_buffer_handle_(command_buffer_handle.Pass()), |
| 15 context_(nullptr), | 15 context_(nullptr), |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 MojoGLES2DestroyContext(context_); | 75 MojoGLES2DestroyContext(context_); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void SurfacesContextProvider::ContextLost() { | 78 void SurfacesContextProvider::ContextLost() { |
| 79 context_lost_ = true; | 79 context_lost_ = true; |
| 80 if (!lost_context_callback_.is_null()) | 80 if (!lost_context_callback_.is_null()) |
| 81 lost_context_callback_.Run(); | 81 lost_context_callback_.Run(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 } // namespace surfaces | 84 } // namespace surfaces |
| OLD | NEW |