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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 683 ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() { | 683 ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() { |
| 684 return this; | 684 return this; |
| 685 } | 685 } |
| 686 | 686 |
| 687 ui::ContextFactoryPrivate* | 687 ui::ContextFactoryPrivate* |
| 688 GpuProcessTransportFactory::GetContextFactoryPrivate() { | 688 GpuProcessTransportFactory::GetContextFactoryPrivate() { |
| 689 return this; | 689 return this; |
| 690 } | 690 } |
| 691 | 691 |
| 692 cc::FrameSinkId GpuProcessTransportFactory::AllocateFrameSinkId() { | 692 cc::FrameSinkId GpuProcessTransportFactory::AllocateFrameSinkId() { |
| 693 // TODO(crbug.com/685777): Centralize allocation in one place. | |
|
boliu
2017/01/26 22:52:40
I was expecting something like
Must be unique wit
| |
| 693 return cc::FrameSinkId(0, next_sink_id_++); | 694 return cc::FrameSinkId(0, next_sink_id_++); |
| 694 } | 695 } |
| 695 | 696 |
| 696 void GpuProcessTransportFactory::SetDisplayVisible(ui::Compositor* compositor, | 697 void GpuProcessTransportFactory::SetDisplayVisible(ui::Compositor* compositor, |
| 697 bool visible) { | 698 bool visible) { |
| 698 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); | 699 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); |
| 699 if (it == per_compositor_data_.end()) | 700 if (it == per_compositor_data_.end()) |
| 700 return; | 701 return; |
| 701 PerCompositorData* data = it->second.get(); | 702 PerCompositorData* data = it->second.get(); |
| 702 DCHECK(data); | 703 DCHECK(data); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 910 shared_vulkan_context_provider_ = | 911 shared_vulkan_context_provider_ = |
| 911 cc::VulkanInProcessContextProvider::Create(); | 912 cc::VulkanInProcessContextProvider::Create(); |
| 912 } | 913 } |
| 913 | 914 |
| 914 shared_vulkan_context_provider_initialized_ = true; | 915 shared_vulkan_context_provider_initialized_ = true; |
| 915 } | 916 } |
| 916 return shared_vulkan_context_provider_; | 917 return shared_vulkan_context_provider_; |
| 917 } | 918 } |
| 918 | 919 |
| 919 } // namespace content | 920 } // namespace content |
| OLD | NEW |