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

Unified Diff: components/exo/shared_memory.cc

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/exo/display.cc ('k') | components/exo/shared_memory_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shared_memory.cc
diff --git a/components/exo/shared_memory.cc b/components/exo/shared_memory.cc
index 7545f6c5e8945ead3ac2b2e8cc66a7e0f74602e7..d0b2176c36b2503f7cb1f3af6695c24eb5fdc33b 100644
--- a/components/exo/shared_memory.cc
+++ b/components/exo/shared_memory.cc
@@ -84,14 +84,14 @@ std::unique_ptr<Buffer> SharedMemory::CreateBuffer(const gfx::Size& size,
// buffers. Making the copy explicit allows the buffer to be reused earlier.
bool use_zero_copy = false;
- return base::WrapUnique(
- new Buffer(std::move(gpu_memory_buffer), GL_TEXTURE_2D,
- // COMMANDS_ISSUED queries are sufficient for shared memory
- // buffers as binding to texture is implemented using a call to
- // glTexImage2D and the buffer can be reused as soon as that
- // command has been issued.
- GL_COMMANDS_ISSUED_CHROMIUM, use_zero_copy,
- false /* is_overlay_candidate */));
+ return base::MakeUnique<Buffer>(
+ std::move(gpu_memory_buffer), GL_TEXTURE_2D,
+ // COMMANDS_ISSUED queries are sufficient for shared memory
+ // buffers as binding to texture is implemented using a call to
+ // glTexImage2D and the buffer can be reused as soon as that
+ // command has been issued.
+ GL_COMMANDS_ISSUED_CHROMIUM, use_zero_copy,
+ false /* is_overlay_candidate */);
}
} // namespace exo
« no previous file with comments | « components/exo/display.cc ('k') | components/exo/shared_memory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698