| 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 "mojo/gpu/gl_context.h" | 5 #include "mojo/gpu/gl_context.h" |
| 6 | 6 |
| 7 #include "mojo/public/cpp/application/connect.h" | 7 #include "mojo/public/cpp/application/connect.h" |
| 8 #include "mojo/public/interfaces/application/shell.mojom.h" | 8 #include "mojo/public/interfaces/application/shell.mojom.h" |
| 9 #include "mojo/services/gpu/public/interfaces/gpu.mojom.h" | 9 #include "mojo/services/gpu/interfaces/gpu.mojom.h" |
| 10 #include "mojo/gpu/mojo_gles2_impl_autogen.h" | 10 #include "mojo/gpu/mojo_gles2_impl_autogen.h" |
| 11 | 11 |
| 12 namespace mojo { | 12 namespace mojo { |
| 13 | 13 |
| 14 GLContext::Observer::~Observer() { | 14 GLContext::Observer::~Observer() { |
| 15 } | 15 } |
| 16 | 16 |
| 17 GLContext::GLContext(Shell* shell) : weak_factory_(this) { | 17 GLContext::GLContext(Shell* shell) : weak_factory_(this) { |
| 18 ServiceProviderPtr native_viewport; | 18 ServiceProviderPtr native_viewport; |
| 19 shell->ConnectToApplication("mojo:native_viewport_service", | 19 shell->ConnectToApplication("mojo:native_viewport_service", |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 void GLContext::ContextLostThunk(void* self) { | 61 void GLContext::ContextLostThunk(void* self) { |
| 62 static_cast<GLContext*>(self)->OnContextLost(); | 62 static_cast<GLContext*>(self)->OnContextLost(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void GLContext::OnContextLost() { | 65 void GLContext::OnContextLost() { |
| 66 FOR_EACH_OBSERVER(Observer, observers_, OnContextLost()); | 66 FOR_EACH_OBSERVER(Observer, observers_, OnContextLost()); |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace mojo | 69 } // namespace mojo |
| OLD | NEW |