| 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/context_provider_mojo.h" | 5 #include "components/surfaces/context_provider_mojo.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 mojo { | 10 namespace mojo { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 if (!context_) | 36 if (!context_) |
| 37 return nullptr; | 37 return nullptr; |
| 38 return static_cast<gpu::ContextSupport*>( | 38 return static_cast<gpu::ContextSupport*>( |
| 39 MojoGLES2GetContextSupport(context_)); | 39 MojoGLES2GetContextSupport(context_)); |
| 40 } | 40 } |
| 41 | 41 |
| 42 class GrContext* ContextProviderMojo::GrContext() { | 42 class GrContext* ContextProviderMojo::GrContext() { |
| 43 return NULL; | 43 return NULL; |
| 44 } | 44 } |
| 45 | 45 |
| 46 void ContextProviderMojo::InvalidateGrContext(uint32_t state) { |
| 47 } |
| 48 |
| 46 cc::ContextProvider::Capabilities ContextProviderMojo::ContextCapabilities() { | 49 cc::ContextProvider::Capabilities ContextProviderMojo::ContextCapabilities() { |
| 47 return capabilities_; | 50 return capabilities_; |
| 48 } | 51 } |
| 49 | 52 |
| 50 void ContextProviderMojo::SetupLock() { | 53 void ContextProviderMojo::SetupLock() { |
| 51 } | 54 } |
| 52 | 55 |
| 53 base::Lock* ContextProviderMojo::GetLock() { | 56 base::Lock* ContextProviderMojo::GetLock() { |
| 54 return &context_lock_; | 57 return &context_lock_; |
| 55 } | 58 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 71 MojoGLES2DestroyContext(context_); | 74 MojoGLES2DestroyContext(context_); |
| 72 } | 75 } |
| 73 | 76 |
| 74 void ContextProviderMojo::ContextLost() { | 77 void ContextProviderMojo::ContextLost() { |
| 75 context_lost_ = true; | 78 context_lost_ = true; |
| 76 if (!lost_context_callback_.is_null()) | 79 if (!lost_context_callback_.is_null()) |
| 77 lost_context_callback_.Run(); | 80 lost_context_callback_.Run(); |
| 78 } | 81 } |
| 79 | 82 |
| 80 } // namespace mojo | 83 } // namespace mojo |
| OLD | NEW |