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/gpu_process_transport_factory.h" | 5 #include "content/browser/compositor/gpu_process_transport_factory.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 base::TimeDelta interval) { | 725 base::TimeDelta interval) { |
726 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); | 726 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); |
727 if (it == per_compositor_data_.end()) | 727 if (it == per_compositor_data_.end()) |
728 return; | 728 return; |
729 PerCompositorData* data = it->second; | 729 PerCompositorData* data = it->second; |
730 DCHECK(data); | 730 DCHECK(data); |
731 if (data->begin_frame_source) | 731 if (data->begin_frame_source) |
732 data->begin_frame_source->SetAuthoritativeVSyncInterval(interval); | 732 data->begin_frame_source->SetAuthoritativeVSyncInterval(interval); |
733 } | 733 } |
734 | 734 |
| 735 void GpuProcessTransportFactory::SetDisplayVSyncParameters( |
| 736 ui::Compositor* compositor, |
| 737 base::TimeTicks timebase, |
| 738 base::TimeDelta interval) { |
| 739 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); |
| 740 if (it == per_compositor_data_.end()) |
| 741 return; |
| 742 PerCompositorData* data = it->second; |
| 743 DCHECK(data); |
| 744 if (data->begin_frame_source) |
| 745 data->begin_frame_source->OnUpdateVSyncParameters(timebase, interval); |
| 746 } |
| 747 |
735 void GpuProcessTransportFactory::SetOutputIsSecure(ui::Compositor* compositor, | 748 void GpuProcessTransportFactory::SetOutputIsSecure(ui::Compositor* compositor, |
736 bool secure) { | 749 bool secure) { |
737 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); | 750 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); |
738 if (it == per_compositor_data_.end()) | 751 if (it == per_compositor_data_.end()) |
739 return; | 752 return; |
740 PerCompositorData* data = it->second; | 753 PerCompositorData* data = it->second; |
741 DCHECK(data); | 754 DCHECK(data); |
742 data->output_is_secure = secure; | 755 data->output_is_secure = secure; |
743 if (data->display) | 756 if (data->display) |
744 data->display->SetOutputIsSecure(secure); | 757 data->display->SetOutputIsSecure(secure); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 shared_vulkan_context_provider_ = | 904 shared_vulkan_context_provider_ = |
892 cc::VulkanInProcessContextProvider::Create(); | 905 cc::VulkanInProcessContextProvider::Create(); |
893 } | 906 } |
894 | 907 |
895 shared_vulkan_context_provider_initialized_ = true; | 908 shared_vulkan_context_provider_initialized_ = true; |
896 } | 909 } |
897 return shared_vulkan_context_provider_; | 910 return shared_vulkan_context_provider_; |
898 } | 911 } |
899 | 912 |
900 } // namespace content | 913 } // namespace content |
OLD | NEW |