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

Side by Side Diff: gpu/command_buffer/common/buffer_unittest.cc

Issue 2909003002: Add gpu::BufferBacking::shared_memory_handle() (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/common/buffer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "gpu/command_buffer/common/buffer.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7
8 namespace gpu {
9
10 TEST(Buffer, SharedMemoryHandle) {
11 const size_t kSize = 1024;
12 std::unique_ptr<base::SharedMemory> shared_memory(new base::SharedMemory);
13 shared_memory->CreateAndMapAnonymous(kSize);
14 auto shared_memory_guid = shared_memory->handle().GetGUID();
15 scoped_refptr<Buffer> buffer =
16 MakeBufferFromSharedMemory(std::move(shared_memory), kSize);
17 EXPECT_EQ(buffer->backing()->shared_memory_handle().GetGUID(),
18 shared_memory_guid);
19 }
20
21 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698