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

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: setvisible-browser: onemore 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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 } 651 }
652 652
653 ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() { 653 ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() {
654 return this; 654 return this;
655 } 655 }
656 656
657 uint32_t GpuProcessTransportFactory::AllocateSurfaceClientId() { 657 uint32_t GpuProcessTransportFactory::AllocateSurfaceClientId() {
658 return next_surface_client_id_++; 658 return next_surface_client_id_++;
659 } 659 }
660 660
661 void GpuProcessTransportFactory::SetDisplayVisible(ui::Compositor* compositor,
662 bool visible) {
663 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor);
664 if (it == per_compositor_data_.end())
665 return;
666 PerCompositorData* data = it->second;
667 DCHECK(data);
668 // The compositor will always SetVisible on the Display once it is set up, so
669 // do nothing if |display| is null.
670 if (data->display)
671 data->display->SetVisible(visible);
672 }
673
661 void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor, 674 void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor,
662 const gfx::Size& size) { 675 const gfx::Size& size) {
663 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); 676 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor);
664 if (it == per_compositor_data_.end()) 677 if (it == per_compositor_data_.end())
665 return; 678 return;
666 PerCompositorData* data = it->second; 679 PerCompositorData* data = it->second;
667 DCHECK(data); 680 DCHECK(data);
668 if (data->display) 681 if (data->display)
669 data->display->Resize(size); 682 data->display->Resize(size);
670 } 683 }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 shared_vulkan_context_provider_ = 874 shared_vulkan_context_provider_ =
862 cc::VulkanInProcessContextProvider::Create(); 875 cc::VulkanInProcessContextProvider::Create();
863 } 876 }
864 877
865 shared_vulkan_context_provider_initialized_ = true; 878 shared_vulkan_context_provider_initialized_ = true;
866 } 879 }
867 return shared_vulkan_context_provider_; 880 return shared_vulkan_context_provider_;
868 } 881 }
869 882
870 } // namespace content 883 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.h ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698