| 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 #include "content/browser/compositor/browser_compositor_output_surface.h" | 5 #include "content/browser/compositor/browser_compositor_output_surface.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "content/browser/compositor/reflector_impl.h" | 10 #include "content/browser/compositor/reflector_impl.h" |
| 11 #include "content/common/gpu/client/context_provider_command_buffer.h" | 11 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( | 15 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( |
| 16 const scoped_refptr<ContextProviderCommandBuffer>& context_provider, | 16 const scoped_refptr<ContextProviderCommandBuffer>& context_provider, |
| 17 const scoped_refptr<ContextProviderCommandBuffer>& worker_context_provider, |
| 17 int surface_id, | 18 int surface_id, |
| 18 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 19 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
| 19 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager) | 20 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager) |
| 20 : OutputSurface(context_provider), | 21 : OutputSurface(context_provider, worker_context_provider), |
| 21 surface_id_(surface_id), | 22 surface_id_(surface_id), |
| 22 output_surface_map_(output_surface_map), | 23 output_surface_map_(output_surface_map), |
| 23 vsync_manager_(vsync_manager) { | 24 vsync_manager_(vsync_manager) { |
| 24 Initialize(); | 25 Initialize(); |
| 25 } | 26 } |
| 26 | 27 |
| 27 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( | 28 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( |
| 28 scoped_ptr<cc::SoftwareOutputDevice> software_device, | 29 scoped_ptr<cc::SoftwareOutputDevice> software_device, |
| 29 int surface_id, | 30 int surface_id, |
| 30 IDMap<BrowserCompositorOutputSurface>* output_surface_map, | 31 IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 DCHECK(CalledOnValidThread()); | 83 DCHECK(CalledOnValidThread()); |
| 83 DCHECK(HasClient()); | 84 DCHECK(HasClient()); |
| 84 vsync_manager_->UpdateVSyncParameters(timebase, interval); | 85 vsync_manager_->UpdateVSyncParameters(timebase, interval); |
| 85 } | 86 } |
| 86 | 87 |
| 87 void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) { | 88 void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) { |
| 88 reflector_ = reflector; | 89 reflector_ = reflector; |
| 89 } | 90 } |
| 90 | 91 |
| 91 } // namespace content | 92 } // namespace content |
| OLD | NEW |