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/cc/context_provider_mojo.h" | 5 #include "mojo/cc/context_provider_mojo.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "mojo/gles2/gles2_context.h" | 8 #include "mojo/gles2/gles2_context.h" |
9 #include "mojo/gpu/mojo_gles2_impl_autogen.h" | 9 #include "mojo/gpu/mojo_gles2_impl_autogen.h" |
10 #include "third_party/mojo/src/mojo/public/cpp/environment/environment.h" | 10 #include "third_party/mojo/src/mojo/public/cpp/environment/environment.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 return capabilities_; | 50 return capabilities_; |
51 } | 51 } |
52 | 52 |
53 void ContextProviderMojo::SetupLock() { | 53 void ContextProviderMojo::SetupLock() { |
54 } | 54 } |
55 | 55 |
56 base::Lock* ContextProviderMojo::GetLock() { | 56 base::Lock* ContextProviderMojo::GetLock() { |
57 return &context_lock_; | 57 return &context_lock_; |
58 } | 58 } |
59 | 59 |
60 bool ContextProviderMojo::DestroyedOnMainThread() { return !context_; } | 60 bool ContextProviderMojo::HasBeenLostOnMainThread() { |
| 61 return !context_; |
| 62 } |
| 63 |
| 64 bool ContextProviderMojo::HasBeenDestroyed() { |
| 65 return !context_; |
| 66 } |
61 | 67 |
62 ContextProviderMojo::~ContextProviderMojo() { | 68 ContextProviderMojo::~ContextProviderMojo() { |
63 context_gl_.reset(); | 69 context_gl_.reset(); |
64 if (context_) | 70 if (context_) |
65 MojoGLES2DestroyContext(context_); | 71 MojoGLES2DestroyContext(context_); |
66 } | 72 } |
67 | 73 |
68 void ContextProviderMojo::ContextLost() { | 74 void ContextProviderMojo::ContextLost() { |
69 } | 75 } |
70 | 76 |
71 } // namespace mojo | 77 } // namespace mojo |
OLD | NEW |