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 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H
_ | 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H
_ |
6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H
_ | 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMPL_H
_ |
7 | 7 |
8 #include "base/synchronization/lock.h" | 8 #include "base/synchronization/lock.h" |
9 #include "content/browser/android/in_process/synchronous_input_event_filter.h" | 9 #include "content/browser/android/in_process/synchronous_input_event_filter.h" |
10 #include "content/renderer/android/synchronous_compositor_factory.h" | 10 #include "content/renderer/android/synchronous_compositor_factory.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } | 52 } |
53 | 53 |
54 void SetDeferredGpuService( | 54 void SetDeferredGpuService( |
55 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); | 55 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); |
56 void CompositorInitializedHardwareDraw(); | 56 void CompositorInitializedHardwareDraw(); |
57 void CompositorReleasedHardwareDraw(); | 57 void CompositorReleasedHardwareDraw(); |
58 | 58 |
59 scoped_refptr<cc::ContextProvider> | 59 scoped_refptr<cc::ContextProvider> |
60 CreateOnscreenContextProviderForCompositorThread( | 60 CreateOnscreenContextProviderForCompositorThread( |
61 scoped_refptr<gfx::GLSurface> surface); | 61 scoped_refptr<gfx::GLSurface> surface); |
| 62 gpu::GLInProcessContext* GetShareContext(); |
62 | 63 |
63 private: | 64 private: |
64 bool CanCreateMainThreadContext(); | 65 bool CanCreateMainThreadContext(); |
65 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> | 66 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> |
66 TryCreateStreamTextureFactory(); | 67 TryCreateStreamTextureFactory(); |
67 | 68 |
68 SynchronousInputEventFilter synchronous_input_event_filter_; | 69 SynchronousInputEventFilter synchronous_input_event_filter_; |
69 | 70 |
70 scoped_refptr<webkit::gpu::ContextProviderWebContext> | 71 scoped_refptr<webkit::gpu::ContextProviderWebContext> |
71 offscreen_context_for_main_thread_; | 72 offscreen_context_for_main_thread_; |
72 | 73 |
73 scoped_refptr<gpu::InProcessCommandBuffer::Service> service_; | 74 scoped_refptr<gpu::InProcessCommandBuffer::Service> service_; |
74 scoped_ptr<gpu::GLInProcessContext> share_context_; | 75 scoped_ptr<gpu::GLInProcessContext> share_context_; |
75 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> | 76 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> |
76 video_context_provider_; | 77 video_context_provider_; |
77 | 78 |
78 // |num_hardware_compositor_lock_| is updated on UI thread only but can be | 79 // |num_hardware_compositor_lock_| is updated on UI thread only but can be |
79 // read on renderer main thread. | 80 // read on renderer main thread. |
80 base::Lock num_hardware_compositor_lock_; | 81 base::Lock num_hardware_compositor_lock_; |
81 unsigned int num_hardware_compositors_; | 82 unsigned int num_hardware_compositors_; |
82 }; | 83 }; |
83 | 84 |
84 } // namespace content | 85 } // namespace content |
85 | 86 |
86 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP
L_H_ | 87 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP
L_H_ |
OLD | NEW |