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 #ifndef ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/synchronization/lock.h" | |
14 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
15 #include "cc/output/context_provider.h" | 14 #include "cc/output/context_provider.h" |
16 #include "gpu/command_buffer/service/in_process_command_buffer.h" | 15 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
17 #include "skia/ext/refptr.h" | 16 #include "skia/ext/refptr.h" |
18 | 17 |
19 namespace gfx { | 18 namespace gfx { |
20 class GLSurface; | 19 class GLSurface; |
21 } | 20 } |
22 | 21 |
23 namespace gpu { | 22 namespace gpu { |
(...skipping 29 matching lines...) Expand all Loading... |
53 | 52 |
54 void OnLostContext(); | 53 void OnLostContext(); |
55 | 54 |
56 base::ThreadChecker main_thread_checker_; | 55 base::ThreadChecker main_thread_checker_; |
57 | 56 |
58 std::unique_ptr<gpu::GLInProcessContext> context_; | 57 std::unique_ptr<gpu::GLInProcessContext> context_; |
59 skia::RefPtr<class GrContext> gr_context_; | 58 skia::RefPtr<class GrContext> gr_context_; |
60 | 59 |
61 cc::ContextProvider::Capabilities capabilities_; | 60 cc::ContextProvider::Capabilities capabilities_; |
62 | 61 |
63 LostContextCallback lost_context_callback_; | |
64 | |
65 base::Lock context_lock_; | |
66 | |
67 DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider); | 62 DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider); |
68 }; | 63 }; |
69 | 64 |
70 } // namespace android_webview | 65 } // namespace android_webview |
71 | 66 |
72 #endif // ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ | 67 #endif // ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_ |
OLD | NEW |