Chromium Code Reviews| Index: cc/surfaces/surface_id_allocator.cc |
| diff --git a/cc/surfaces/surface_id_allocator.cc b/cc/surfaces/surface_id_allocator.cc |
| index 84523e130561818b6a4e4cf5574d63e00fbecb3b..8c78e83422877b8d660741288835448d1654b772 100644 |
| --- a/cc/surfaces/surface_id_allocator.cc |
| +++ b/cc/surfaces/surface_id_allocator.cc |
| @@ -16,10 +16,10 @@ SurfaceIdAllocator::SurfaceIdAllocator() : next_id_(1u) {} |
| SurfaceIdAllocator::~SurfaceIdAllocator() { |
| } |
| -LocalSurfaceId SurfaceIdAllocator::GenerateId() { |
| - LocalSurfaceId id(next_id_, base::UnguessableToken::Create()); |
| - next_id_++; |
| - return id; |
| +const LocalSurfaceId& SurfaceIdAllocator::GenerateId() { |
|
vmpstr
2017/02/07 22:46:20
Why this change?
Fady Samuel
2017/02/08 00:52:50
It's not necessary for now. I've reverted it.
|
| + current_local_surface_id_ = |
| + LocalSurfaceId(next_id_++, base::UnguessableToken::Create()); |
| + return current_local_surface_id_; |
| } |
| } // namespace cc |