Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 2238693002: Plumb SetVisible from ui::Compositor to the DirectRenderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 } 648 }
649 649
650 ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() { 650 ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() {
651 return this; 651 return this;
652 } 652 }
653 653
654 uint32_t GpuProcessTransportFactory::AllocateSurfaceClientId() { 654 uint32_t GpuProcessTransportFactory::AllocateSurfaceClientId() {
655 return next_surface_client_id_++; 655 return next_surface_client_id_++;
656 } 656 }
657 657
658 void GpuProcessTransportFactory::SetDisplayVisible(ui::Compositor* compositor,
659 bool visible) {
660 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor);
661 if (it == per_compositor_data_.end())
662 return;
663 PerCompositorData* data = it->second;
664 DCHECK(data);
665 if (data->display)
666 data->display->SetVisible(visible);
667 }
668
658 void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor, 669 void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor,
659 const gfx::Size& size) { 670 const gfx::Size& size) {
660 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); 671 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor);
661 if (it == per_compositor_data_.end()) 672 if (it == per_compositor_data_.end())
662 return; 673 return;
663 PerCompositorData* data = it->second; 674 PerCompositorData* data = it->second;
664 DCHECK(data); 675 DCHECK(data);
665 if (data->display) 676 if (data->display)
666 data->display->Resize(size); 677 data->display->Resize(size);
667 } 678 }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 shared_vulkan_context_provider_ = 869 shared_vulkan_context_provider_ =
859 cc::VulkanInProcessContextProvider::Create(); 870 cc::VulkanInProcessContextProvider::Create();
860 } 871 }
861 872
862 shared_vulkan_context_provider_initialized_ = true; 873 shared_vulkan_context_provider_initialized_ = true;
863 } 874 }
864 return shared_vulkan_context_provider_; 875 return shared_vulkan_context_provider_;
865 } 876 }
866 877
867 } // namespace content 878 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698