summaryrefslogtreecommitdiff
path: root/chromium/media/gpu/macros.h
blob: e758332ecccf02487d0f85f9f5e39a30ec1918ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2018 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.

#ifndef MEDIA_GPU_MACROS_H_
#define MEDIA_GPU_MACROS_H_

#include "base/logging.h"

#define DVLOGF(level) DVLOG(level) << __func__ << "(): "
#define VLOGF(level) VLOG(level) << __func__ << "(): "
#define VPLOGF(level) VPLOG(level) << __func__ << "(): "

namespace media {

// Copy the memory between arrays with checking the array size.
template <typename T, size_t N>
inline void SafeArrayMemcpy(T (&to)[N], const T (&from)[N]) {
  memcpy(to, from, sizeof(T[N]));
}

}  // namespace media

#endif  // MEDIA_GPU_MACROS_H_