| 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 if (it == per_compositor_data_.end()) | 748 if (it == per_compositor_data_.end()) |
| 749 return; | 749 return; |
| 750 PerCompositorData* data = it->second.get(); | 750 PerCompositorData* data = it->second.get(); |
| 751 DCHECK(data); | 751 DCHECK(data); |
| 752 if (data->display) | 752 if (data->display) |
| 753 data->display->Resize(size); | 753 data->display->Resize(size); |
| 754 } | 754 } |
| 755 | 755 |
| 756 void GpuProcessTransportFactory::SetDisplayColorSpace( | 756 void GpuProcessTransportFactory::SetDisplayColorSpace( |
| 757 ui::Compositor* compositor, | 757 ui::Compositor* compositor, |
| 758 const gfx::ColorSpace& color_space) { | 758 const gfx::ColorSpace& blending_color_space, |
| 759 const gfx::ColorSpace& output_color_space) { |
| 759 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); | 760 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); |
| 760 if (it == per_compositor_data_.end()) | 761 if (it == per_compositor_data_.end()) |
| 761 return; | 762 return; |
| 762 PerCompositorData* data = it->second.get(); | 763 PerCompositorData* data = it->second.get(); |
| 763 DCHECK(data); | 764 DCHECK(data); |
| 764 // The compositor will always SetColorSpace on the Display once it is set up, | 765 // The compositor will always SetColorSpace on the Display once it is set up, |
| 765 // so do nothing if |display| is null. | 766 // so do nothing if |display| is null. |
| 766 if (data->display) | 767 if (data->display) |
| 767 data->display->SetColorSpace(color_space); | 768 data->display->SetColorSpace(blending_color_space, output_color_space); |
| 768 } | 769 } |
| 769 | 770 |
| 770 void GpuProcessTransportFactory::SetAuthoritativeVSyncInterval( | 771 void GpuProcessTransportFactory::SetAuthoritativeVSyncInterval( |
| 771 ui::Compositor* compositor, | 772 ui::Compositor* compositor, |
| 772 base::TimeDelta interval) { | 773 base::TimeDelta interval) { |
| 773 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); | 774 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); |
| 774 if (it == per_compositor_data_.end()) | 775 if (it == per_compositor_data_.end()) |
| 775 return; | 776 return; |
| 776 PerCompositorData* data = it->second.get(); | 777 PerCompositorData* data = it->second.get(); |
| 777 DCHECK(data); | 778 DCHECK(data); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 shared_vulkan_context_provider_ = | 951 shared_vulkan_context_provider_ = |
| 951 cc::VulkanInProcessContextProvider::Create(); | 952 cc::VulkanInProcessContextProvider::Create(); |
| 952 } | 953 } |
| 953 | 954 |
| 954 shared_vulkan_context_provider_initialized_ = true; | 955 shared_vulkan_context_provider_initialized_ = true; |
| 955 } | 956 } |
| 956 return shared_vulkan_context_provider_; | 957 return shared_vulkan_context_provider_; |
| 957 } | 958 } |
| 958 | 959 |
| 959 } // namespace content | 960 } // namespace content |
| OLD | NEW |