Index: content/browser/renderer_host/compositor_impl_android.cc |
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc |
index 66bc2eb270e83844ab6dd208fee4438d12d5ddf4..1d20f27c71cf0f2fab59bfa1cd6a5f5c1d5cfabe 100644 |
--- a/content/browser/renderer_host/compositor_impl_android.cc |
+++ b/content/browser/renderer_host/compositor_impl_android.cc |
@@ -337,14 +337,12 @@ cc::SurfaceManager* CompositorImpl::GetSurfaceManager() { |
} |
// static |
-std::unique_ptr<cc::SurfaceIdAllocator> |
-CompositorImpl::CreateSurfaceIdAllocator() { |
- std::unique_ptr<cc::SurfaceIdAllocator> allocator( |
- new cc::SurfaceIdAllocator(++g_surface_client_id)); |
+uint32_t CompositorImpl::AllocateSurfaceClientId() { |
+ uint32_t client_id = ++g_surface_client_id; |
cc::SurfaceManager* manager = GetSurfaceManager(); |
DCHECK(manager); |
- allocator->RegisterSurfaceClientId(manager); |
- return allocator; |
+ manager->RegisterSurfaceClientId(client_id); |
+ return client_id; |
} |
// static |
@@ -364,7 +362,8 @@ CompositorImpl::SharedVulkanContextProviderAndroid() { |
CompositorImpl::CompositorImpl(CompositorClient* client, |
gfx::NativeWindow root_window) |
: root_layer_(cc::Layer::Create()), |
- surface_id_allocator_(CreateSurfaceIdAllocator()), |
+ surface_id_allocator_( |
+ new cc::SurfaceIdAllocator(AllocateSurfaceClientId())), |
resource_manager_(root_window), |
has_transparent_background_(false), |
device_scale_factor_(1), |