| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "android_webview/browser/aw_render_thread_context_provider.h" | 5 #include "android_webview/browser/aw_render_thread_context_provider.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| 11 #include "cc/output/managed_memory_policy.h" | 11 #include "cc/output/managed_memory_policy.h" |
| 12 #include "gpu/blink/webgraphicscontext3d_impl.h" | |
| 13 #include "gpu/command_buffer/client/gl_in_process_context.h" | 12 #include "gpu/command_buffer/client/gl_in_process_context.h" |
| 14 #include "gpu/command_buffer/client/gles2_implementation.h" | 13 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 15 #include "gpu/command_buffer/client/gles2_lib.h" | 14 #include "gpu/command_buffer/client/gles2_lib.h" |
| 16 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" | 15 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" |
| 17 #include "third_party/skia/include/gpu/GrContext.h" | 16 #include "third_party/skia/include/gpu/GrContext.h" |
| 18 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" | 17 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" |
| 19 | 18 |
| 20 namespace android_webview { | 19 namespace android_webview { |
| 21 | 20 |
| 22 // static | 21 // static |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void AwRenderThreadContextProvider::OnLostContext() { | 139 void AwRenderThreadContextProvider::OnLostContext() { |
| 141 DCHECK(main_thread_checker_.CalledOnValidThread()); | 140 DCHECK(main_thread_checker_.CalledOnValidThread()); |
| 142 | 141 |
| 143 if (!lost_context_callback_.is_null()) | 142 if (!lost_context_callback_.is_null()) |
| 144 lost_context_callback_.Run(); | 143 lost_context_callback_.Run(); |
| 145 if (gr_context_) | 144 if (gr_context_) |
| 146 gr_context_->abandonContext(); | 145 gr_context_->abandonContext(); |
| 147 } | 146 } |
| 148 | 147 |
| 149 } // namespace android_webview | 148 } // namespace android_webview |
| OLD | NEW |