OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/android/in_process/synchronous_compositor_impl.h" | 5 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 // static | 108 // static |
109 void SynchronousCompositorImpl::SetGpuServiceInProc( | 109 void SynchronousCompositorImpl::SetGpuServiceInProc( |
110 scoped_refptr<gpu::InProcessCommandBuffer::Service> service) { | 110 scoped_refptr<gpu::InProcessCommandBuffer::Service> service) { |
111 g_factory.Get().SetDeferredGpuService(service); | 111 g_factory.Get().SetDeferredGpuService(service); |
112 } | 112 } |
113 | 113 |
114 void SynchronousCompositorImpl::DidInitializeRendererObjects( | 114 void SynchronousCompositorImpl::DidInitializeRendererObjects( |
115 SynchronousCompositorOutputSurface* output_surface, | 115 SynchronousCompositorOutputSurface* output_surface, |
116 SynchronousCompositorExternalBeginFrameSource* begin_frame_source, | 116 SynchronousCompositorExternalBeginFrameSource* begin_frame_source, |
117 SynchronousInputHandlerProxy* synchronous_input_handler_proxy) { | 117 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy) { |
118 DCHECK(!output_surface_); | 118 DCHECK(!output_surface_); |
119 DCHECK(!begin_frame_source_); | 119 DCHECK(!begin_frame_source_); |
120 DCHECK(output_surface); | 120 DCHECK(output_surface); |
121 DCHECK(begin_frame_source); | 121 DCHECK(begin_frame_source); |
122 DCHECK(synchronous_input_handler_proxy); | 122 DCHECK(synchronous_input_handler_proxy); |
123 | 123 |
124 output_surface_ = output_surface; | 124 output_surface_ = output_surface; |
125 begin_frame_source_ = begin_frame_source; | 125 begin_frame_source_ = begin_frame_source; |
126 synchronous_input_handler_proxy_ = synchronous_input_handler_proxy; | 126 synchronous_input_handler_proxy_ = synchronous_input_handler_proxy; |
127 | 127 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 } | 343 } |
344 } | 344 } |
345 | 345 |
346 // Not using base::NonThreadSafe as we want to enforce a more exacting threading | 346 // Not using base::NonThreadSafe as we want to enforce a more exacting threading |
347 // requirement: SynchronousCompositorImpl() must only be used on the UI thread. | 347 // requirement: SynchronousCompositorImpl() must only be used on the UI thread. |
348 bool SynchronousCompositorImpl::CalledOnValidThread() const { | 348 bool SynchronousCompositorImpl::CalledOnValidThread() const { |
349 return BrowserThread::CurrentlyOn(BrowserThread::UI); | 349 return BrowserThread::CurrentlyOn(BrowserThread::UI); |
350 } | 350 } |
351 | 351 |
352 } // namespace content | 352 } // namespace content |
OLD | NEW |