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

Unified Diff: mojo/services/gles2/command_buffer_type_conversions.cc

Issue 221453007: mojo/gpu: use SharedBuffer instead of base::SharedMemory with hacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix missing include Created 6 years, 9 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 | « mojo/services/gles2/command_buffer_type_conversions.h ('k') | mojo/services/gles2/mojo_buffer_backing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/gles2/command_buffer_type_conversions.cc
diff --git a/mojo/services/gles2/command_buffer_type_conversions.cc b/mojo/services/gles2/command_buffer_type_conversions.cc
index ccde8f0d87b3441963830c8506e374fb971cdb46..79b00197ed605d2d29499312f2dfac74eb579c95 100644
--- a/mojo/services/gles2/command_buffer_type_conversions.cc
+++ b/mojo/services/gles2/command_buffer_type_conversions.cc
@@ -4,34 +4,10 @@
#include "mojo/services/gles2/command_buffer_type_conversions.h"
-#include <string.h>
-
#include "mojo/services/gles2/command_buffer.mojom.h"
namespace mojo {
-COMPILE_ASSERT(sizeof(base::SharedMemoryHandle) <= sizeof(uint64_t),
- mojo_ShmHandle_too_small_for_base_SharedMemoryHandle);
-
-ShmHandle TypeConverter<ShmHandle, base::SharedMemoryHandle>::ConvertFrom(
- const base::SharedMemoryHandle& input,
- Buffer* buffer) {
- ShmHandle::Builder result(buffer);
- uint64_t handle = 0;
- memcpy(&handle, &input, sizeof(input));
- result.set_handle_hack(handle);
- return result.Finish();
-}
-
-base::SharedMemoryHandle
-TypeConverter<ShmHandle, base::SharedMemoryHandle>::ConvertTo(
- const ShmHandle& input) {
- base::SharedMemoryHandle output;
- uint64_t handle = input.handle_hack();
- memcpy(&output, &handle, sizeof(output));
- return output;
-}
-
CommandBufferState
TypeConverter<CommandBufferState, gpu::CommandBuffer::State>::ConvertFrom(
const gpu::CommandBuffer::State& input,
« no previous file with comments | « mojo/services/gles2/command_buffer_type_conversions.h ('k') | mojo/services/gles2/mojo_buffer_backing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698