Index: android_webview/browser/aw_render_thread_context_provider.cc |
diff --git a/android_webview/browser/aw_render_thread_context_provider.cc b/android_webview/browser/aw_render_thread_context_provider.cc |
index fe115c6d0afb77b2b13d837f3054eb126fd012d1..c52a10aa6331a651c79e487273d507e3681e25cf 100644 |
--- a/android_webview/browser/aw_render_thread_context_provider.cc |
+++ b/android_webview/browser/aw_render_thread_context_provider.cc |
@@ -52,12 +52,9 @@ AwRenderThreadContextProvider::AwRenderThreadContextProvider( |
attributes.bind_generates_resource = false; |
context_.reset(gpu::GLInProcessContext::Create( |
service, surface, surface->IsOffscreen(), gfx::kNullAcceleratedWidget, |
- surface->GetSize(), nullptr /* share_context */, |
- false /* share_resources */, attributes, gfx::PreferDiscreteGpu, |
- gpu::GLInProcessContextSharedMemoryLimits(), nullptr, nullptr)); |
- |
- context_->SetContextLostCallback(base::Bind( |
- &AwRenderThreadContextProvider::OnLostContext, base::Unretained(this))); |
+ surface->GetSize(), nullptr /* share_context */, attributes, |
+ gfx::PreferDiscreteGpu, gpu::GLInProcessContextSharedMemoryLimits(), |
+ nullptr, nullptr)); |
capabilities_.gpu = context_->GetImplementation()->capabilities(); |
} |
@@ -116,11 +113,14 @@ void AwRenderThreadContextProvider::InvalidateGrContext(uint32_t state) { |
} |
void AwRenderThreadContextProvider::SetupLock() { |
- context_->SetLock(&context_lock_); |
+ // This context provider is not used on multiple threads. |
+ NOTREACHED(); |
} |
base::Lock* AwRenderThreadContextProvider::GetLock() { |
- return &context_lock_; |
+ // This context provider is not used on multiple threads. |
+ NOTREACHED(); |
+ return nullptr; |
} |
void AwRenderThreadContextProvider::DeleteCachedResources() { |
@@ -135,16 +135,8 @@ void AwRenderThreadContextProvider::DeleteCachedResources() { |
void AwRenderThreadContextProvider::SetLostContextCallback( |
const LostContextCallback& lost_context_callback) { |
- lost_context_callback_ = lost_context_callback; |
-} |
- |
-void AwRenderThreadContextProvider::OnLostContext() { |
- DCHECK(main_thread_checker_.CalledOnValidThread()); |
- |
- if (!lost_context_callback_.is_null()) |
- base::ResetAndReturn(&lost_context_callback_).Run(); |
- if (gr_context_) |
- gr_context_->abandonContext(); |
+ // No support for lost context callbacks with in-process GL. |
+ NOTREACHED(); |
} |
} // namespace android_webview |