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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 2166423002: ui::ContextFactory should not create SurfaceIdAllocators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Android + Addressed Antoine's comment Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 821f642ac2a9ee5cfa4d12fa336c1345a82859fe..79b14c1a515177b070f1167199d058b1eadc5c0c 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -687,13 +687,11 @@ ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() {
return this;
}
-std::unique_ptr<cc::SurfaceIdAllocator>
-GpuProcessTransportFactory::CreateSurfaceIdAllocator() {
- std::unique_ptr<cc::SurfaceIdAllocator> allocator =
- base::WrapUnique(new cc::SurfaceIdAllocator(next_surface_client_id_++));
+uint32_t GpuProcessTransportFactory::AllocateSurfaceClientId() {
+ uint32_t client_id = next_surface_client_id_++;
if (GetSurfaceManager())
- allocator->RegisterSurfaceClientId(GetSurfaceManager());
- return allocator;
+ GetSurfaceManager()->RegisterSurfaceClientId(client_id);
piman 2016/07/21 17:19:47 So, the previous code also relied on SurfaceIdAllo
Fady Samuel 2016/07/21 17:22:23 Well, it is still needed, but SurfaceIdAllocator w
piman 2016/07/21 17:28:40 With this patch, the SurfaceIdAllocator doesn't kn
Fady Samuel 2016/07/21 20:43:33 I've made all the clients that create SurfaceIdAll
+ return client_id;
}
void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor,
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.h ('k') | content/browser/compositor/surface_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698