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 "cc/blink/context_provider_web_context.h" | 9 #include "cc/blink/context_provider_web_context.h" |
10 #include "content/browser/android/in_process/synchronous_input_event_filter.h" | 10 #include "content/browser/android/in_process/synchronous_input_event_filter.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 SynchronousInputEventFilter* synchronous_input_event_filter() { | 50 SynchronousInputEventFilter* synchronous_input_event_filter() { |
51 return &synchronous_input_event_filter_; | 51 return &synchronous_input_event_filter_; |
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 SetRecordFullDocument(bool record_full_document); | 56 void SetRecordFullDocument(bool record_full_document); |
57 void CompositorInitializedHardwareDraw(); | 57 void CompositorInitializedHardwareDraw(); |
58 void CompositorReleasedHardwareDraw(); | 58 void CompositorReleasedHardwareDraw(); |
59 | 59 |
60 scoped_refptr<cc::ContextProvider> | 60 scoped_refptr<cc::ContextProvider> CreateContextProviderForCompositor(); |
61 CreateOnscreenContextProviderForCompositorThread(); | |
62 | 61 |
63 private: | 62 private: |
64 bool CanCreateMainThreadContext(); | 63 bool CanCreateMainThreadContext(); |
65 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> | 64 scoped_refptr<StreamTextureFactorySynchronousImpl::ContextProvider> |
66 TryCreateStreamTextureFactory(); | 65 TryCreateStreamTextureFactory(); |
67 void RestoreContextOnMainThread(); | 66 void RestoreContextOnMainThread(); |
68 | 67 |
69 SynchronousInputEventFilter synchronous_input_event_filter_; | 68 SynchronousInputEventFilter synchronous_input_event_filter_; |
70 | 69 |
71 scoped_refptr<gpu::InProcessCommandBuffer::Service> service_; | 70 scoped_refptr<gpu::InProcessCommandBuffer::Service> service_; |
72 | 71 |
73 class VideoContextProvider; | 72 class VideoContextProvider; |
74 scoped_refptr<VideoContextProvider> video_context_provider_; | 73 scoped_refptr<VideoContextProvider> video_context_provider_; |
75 | 74 |
76 bool record_full_layer_; | 75 bool record_full_layer_; |
77 | 76 |
78 // |num_hardware_compositor_lock_| is updated on UI thread only but can be | 77 // |num_hardware_compositor_lock_| is updated on UI thread only but can be |
79 // read on renderer main thread. | 78 // read on renderer main thread. |
80 base::Lock num_hardware_compositor_lock_; | 79 base::Lock num_hardware_compositor_lock_; |
81 unsigned int num_hardware_compositors_; | 80 unsigned int num_hardware_compositors_; |
82 scoped_refptr<base::MessageLoopProxy> main_thread_proxy_; | 81 scoped_refptr<base::MessageLoopProxy> main_thread_proxy_; |
83 }; | 82 }; |
84 | 83 |
85 } // namespace content | 84 } // namespace content |
86 | 85 |
87 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP
L_H_ | 86 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_FACTORY_IMP
L_H_ |
OLD | NEW |