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

Unified Diff: components/exo/buffer.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/drive/service/fake_drive_service.cc ('k') | components/exo/display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/buffer.cc
diff --git a/components/exo/buffer.cc b/components/exo/buffer.cc
index 7ec46c5cc4097c2cfdb11d05d6ad4b8d6e64b2dd..205a6466fc1e432d752616741945ea282d8000f8 100644
--- a/components/exo/buffer.cc
+++ b/components/exo/buffer.cc
@@ -439,9 +439,9 @@ std::unique_ptr<cc::SingleReleaseCallback> Buffer::ProduceTextureMailbox(
// if one doesn't already exist. The contents of this buffer are copied to
// |texture| using a call to CopyTexImage.
if (!contents_texture_) {
- contents_texture_ = base::WrapUnique(
- new Texture(context_factory, context_provider.get(),
- gpu_memory_buffer_.get(), texture_target_, query_type_));
+ contents_texture_ = base::MakeUnique<Texture>(
+ context_factory, context_provider.get(), gpu_memory_buffer_.get(),
+ texture_target_, query_type_);
}
if (use_zero_copy_) {
@@ -466,7 +466,7 @@ std::unique_ptr<cc::SingleReleaseCallback> Buffer::ProduceTextureMailbox(
// Create a mailbox texture that we copy the buffer contents to.
if (!texture_) {
texture_ =
- base::WrapUnique(new Texture(context_factory, context_provider.get()));
+ base::MakeUnique<Texture>(context_factory, context_provider.get());
}
// Copy the contents of |contents_texture| to |texture| and produce a
« no previous file with comments | « components/drive/service/fake_drive_service.cc ('k') | components/exo/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698