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

Unified Diff: services/ui/common/mojo_buffer_backing.cc

Issue 2184943002: services/ui: Move some files into the client lib. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome-gpu-in-mus-windows
Patch Set: . 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 | « services/ui/common/mojo_buffer_backing.h ('k') | services/ui/common/mojo_gpu_memory_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/common/mojo_buffer_backing.cc
diff --git a/services/ui/common/mojo_buffer_backing.cc b/services/ui/common/mojo_buffer_backing.cc
deleted file mode 100644
index de377f49376316fce5e2740f31204305001f84fe..0000000000000000000000000000000000000000
--- a/services/ui/common/mojo_buffer_backing.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "services/ui/common/mojo_buffer_backing.h"
-
-#include "base/logging.h"
-#include "base/memory/ptr_util.h"
-
-namespace ui {
-
-MojoBufferBacking::MojoBufferBacking(mojo::ScopedSharedBufferMapping mapping,
- size_t size)
- : mapping_(std::move(mapping)), size_(size) {}
-
-MojoBufferBacking::~MojoBufferBacking() = default;
-
-// static
-std::unique_ptr<gpu::BufferBacking> MojoBufferBacking::Create(
- mojo::ScopedSharedBufferHandle handle,
- size_t size) {
- mojo::ScopedSharedBufferMapping mapping = handle->Map(size);
- if (!mapping)
- return nullptr;
- return base::MakeUnique<MojoBufferBacking>(std::move(mapping), size);
-}
-void* MojoBufferBacking::GetMemory() const {
- return mapping_.get();
-}
-size_t MojoBufferBacking::GetSize() const {
- return size_;
-}
-
-} // namespace ui
« no previous file with comments | « services/ui/common/mojo_buffer_backing.h ('k') | services/ui/common/mojo_gpu_memory_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698