chromium/gpu/ipc/common/gpu_command_buffer_traits.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "gpu/ipc/common/gpu_command_buffer_traits.h"

#include <stddef.h>
#include <stdint.h>

#include "base/strings/stringprintf.h"
#include "gpu/command_buffer/common/command_buffer_id.h"
#include "gpu/command_buffer/common/mailbox_holder.h"
#include "gpu/command_buffer/common/sync_token.h"
#include "gpu/ipc/common/vulkan_ycbcr_info.h"
#include "ui/gfx/buffer_format_util.h"

// Generate param traits write methods.
#include "ipc/param_traits_write_macros.h"
namespace IPC {
#include "gpu/ipc/common/gpu_command_buffer_traits_multi.h"
}  // namespace IPC

// Generate param traits read methods.
#include "ipc/param_traits_read_macros.h"
namespace IPC {
#include "gpu/ipc/common/gpu_command_buffer_traits_multi.h"
}  // namespace IPC

// Generate param traits log methods.
#include "ipc/param_traits_log_macros.h"
namespace IPC {
#include "gpu/ipc/common/gpu_command_buffer_traits_multi.h"
}  // namespace IPC

namespace IPC {

void ParamTraits<gpu::SyncToken>::Write(base::Pickle* m, const param_type& p) {}

bool ParamTraits<gpu::SyncToken>::Read(const base::Pickle* m,
                                       base::PickleIterator* iter,
                                       param_type* p) {}

void ParamTraits<gpu::SyncToken>::Log(const param_type& p, std::string* l) {}

void ParamTraits<gpu::Mailbox>::Write(base::Pickle* m, const param_type& p) {}

bool ParamTraits<gpu::Mailbox>::Read(const base::Pickle* m,
                                     base::PickleIterator* iter,
                                     param_type* p) {}

void ParamTraits<gpu::Mailbox>::Log(const param_type& p, std::string* l) {}

void ParamTraits<gpu::MailboxHolder>::Write(base::Pickle* m,
                                            const param_type& p) {}

bool ParamTraits<gpu::MailboxHolder>::Read(const base::Pickle* m,
                                           base::PickleIterator* iter,
                                           param_type* p) {}

void ParamTraits<gpu::MailboxHolder>::Log(const param_type& p, std::string* l) {}

void ParamTraits<gpu::VulkanYCbCrInfo>::Write(base::Pickle* m,
                                              const param_type& p) {}

bool ParamTraits<gpu::VulkanYCbCrInfo>::Read(const base::Pickle* m,
                                             base::PickleIterator* iter,
                                             param_type* p) {}

// Note that we are casting uint64_t explicitly to long long otherwise it gets
// implicit cast to long for 64 bit OS and long long for 32 bit OS.
void ParamTraits<gpu::VulkanYCbCrInfo>::Log(const param_type& p,
                                            std::string* l) {}

void ParamTraits<gpu::GpuMemoryBufferFormatSet>::Write(base::Pickle* m,
                                                       const param_type& p) {}

bool ParamTraits<gpu::GpuMemoryBufferFormatSet>::Read(
    const base::Pickle* m,
    base::PickleIterator* iter,
    param_type* p) {}

void ParamTraits<gpu::GpuMemoryBufferFormatSet>::Log(const param_type& p,
                                                     std::string* l) {}

}  // namespace IPC