Chromium Code Reviews| 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 677 if (it == per_compositor_data_.end()) | 677 if (it == per_compositor_data_.end()) |
| 678 return; | 678 return; |
| 679 PerCompositorData* data = it->second.get(); | 679 PerCompositorData* data = it->second.get(); |
| 680 DCHECK(data); | 680 DCHECK(data); |
| 681 if (data->display) | 681 if (data->display) |
| 682 data->display->Resize(size); | 682 data->display->Resize(size); |
| 683 } | 683 } |
| 684 | 684 |
| 685 void GpuProcessTransportFactory::SetDisplayColorSpace( | 685 void GpuProcessTransportFactory::SetDisplayColorSpace( |
| 686 ui::Compositor* compositor, | 686 ui::Compositor* compositor, |
| 687 const gfx::ColorSpace& color_space) { | 687 const gfx::ColorSpace& color_space) { |
|
ccameron
2016/09/02 21:10:32
danakj, could you verify the correctness of this -
hubbe
2016/09/02 21:35:49
Acknowledged.
| |
| 688 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); | 688 PerCompositorData* data = per_compositor_data_[compositor].get(); |
| 689 if (it == per_compositor_data_.end()) | 689 if (!data) |
| 690 return; | 690 data = CreatePerCompositorData(compositor); |
|
danakj
2016/09/02 21:11:45
I don't think you want to do this. Instead just st
hubbe
2016/09/02 21:35:49
Added it to ui:Compositor.
Does that mean we don't
danakj
2016/09/02 21:36:47
Ya that'd be ideal.
hubbe
2016/09/02 22:30:47
Gone.
| |
| 691 PerCompositorData* data = it->second.get(); | |
| 692 DCHECK(data); | 691 DCHECK(data); |
| 693 data->color_space = color_space; | 692 data->color_space = color_space; |
| 694 if (data->display) | 693 if (data->display) |
| 695 data->display->SetColorSpace(data->color_space); | 694 data->display->SetColorSpace(data->color_space); |
| 696 } | 695 } |
| 697 | 696 |
| 698 void GpuProcessTransportFactory::SetAuthoritativeVSyncInterval( | 697 void GpuProcessTransportFactory::SetAuthoritativeVSyncInterval( |
| 699 ui::Compositor* compositor, | 698 ui::Compositor* compositor, |
| 700 base::TimeDelta interval) { | 699 base::TimeDelta interval) { |
| 701 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); | 700 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 874 shared_vulkan_context_provider_ = | 873 shared_vulkan_context_provider_ = |
| 875 cc::VulkanInProcessContextProvider::Create(); | 874 cc::VulkanInProcessContextProvider::Create(); |
| 876 } | 875 } |
| 877 | 876 |
| 878 shared_vulkan_context_provider_initialized_ = true; | 877 shared_vulkan_context_provider_initialized_ = true; |
| 879 } | 878 } |
| 880 return shared_vulkan_context_provider_; | 879 return shared_vulkan_context_provider_; |
| 881 } | 880 } |
| 882 | 881 |
| 883 } // namespace content | 882 } // namespace content |
| OLD | NEW |