Commit 5ea762a6 by Jamie Madill Committed by Commit Bot

Consolidate base:: imports.

This merges the mrucache and numerics into one folder, to prevent having to make two identical versions of logging. BUG=angleproject:2044 Change-Id: Iba6dab05b21eb9ba0de44f27a90579c590a9a7fd Reviewed-on: https://chromium-review.googlesource.com/522870Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent c4d18aac
......@@ -138,7 +138,7 @@ config("angle_release_asserts_config") {
}
config("angle_common_config") {
include_dirs = [ "src/common/third_party/numerics" ]
include_dirs = [ "src/common/third_party/base" ]
}
static_library("angle_common") {
......@@ -390,7 +390,7 @@ config("libANGLE_config") {
static_library("libANGLE") {
sources = rebase_path(gles_gypi.libangle_sources, ".", "src")
include_dirs = [ "src/third_party/mrucache" ]
include_dirs = []
libs = []
defines = []
public_deps = [
......
......@@ -70,7 +70,7 @@
[
'.',
'../include',
'common/third_party/numerics',
'common/third_party/base',
],
'dependencies':
[
......@@ -82,7 +82,7 @@
[
'<(angle_path)/include',
'<(angle_path)/src',
'<(angle_path)/src/common/third_party/numerics',
'<(angle_path)/src/common/third_party/base',
],
'conditions':
[
......
......@@ -16,7 +16,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <base/numerics/safe_math.h>
#include <anglebase/numerics/safe_math.h>
#include "common/debug.h"
#include "common/platform.h"
......
Name: Chromium: base/numerics
Short Name: base::numerics
Name: Chromium base:: helper Classes
Short Name: base::numerics and base::MRUCache
Version:
URL: https://chromium.googlesource.com/chromium/src.git/+/lkcr/base/numerics/
URL: https://chromium.googlesource.com/chromium/src/base/+/master
SOURCE CODE: Copy the Chromium folder manually into this folder and run git cl format.
Date: 30/05/2016
Date: 24/05/2017
Revision: 28b5bbb227d331c01e6ff9b2f8729732135aadc7 (Chromium)
Security Critical: no
License: Chromium
......@@ -11,11 +11,15 @@ License File: LICENSE in Chromium/src
Description:
base::numerics is a library for doing some simple safe math and conversions.
To update the checkout, simply overwrite the base/numerics folder with
Chromium's latest.
base::MRUCache is a few collections of most-recently-used caching structures.
To update the checkout, simply overwrite the folder with Chromium's latest, apply
the appropriate namespace, and make sure the paths are correct (anglebase/ instead of
base/).
Modifications:
- base/logging.h defines CHECK to be ASSERT to be compatible with ANGLE.
- base/numerics/*.h uses namespace angle::base instead of base:: to avoid ODR
- the file scope is now anglebase/ from base/ to prevent include conflicts.
- anglebase/logging.h defines (D)CHECK to be ASSERT to be compatible with ANGLE.
- the headers use namespace angle::base instead of base:: to avoid ODR
violations when ANGLE code is mixed with Chromium code.
......@@ -25,8 +25,8 @@
#include <unordered_map>
#include <utility>
#include "base/logging.h"
#include "base/macros.h"
#include "anglebase/logging.h"
#include "anglebase/macros.h"
namespace angle
{
......
......@@ -10,6 +10,10 @@
#include "common/debug.h"
#ifndef DCHECK
#define DCHECK(X) ASSERT(X)
#endif
#ifndef CHECK
#define CHECK(X) ASSERT(X)
#endif
......
......@@ -10,8 +10,8 @@
#include <limits>
#include <type_traits>
#include "base/logging.h"
#include "base/numerics/safe_conversions_impl.h"
#include "anglebase/logging.h"
#include "anglebase/numerics/safe_conversions_impl.h"
namespace angle
{
......
......@@ -10,8 +10,8 @@
#include <limits>
#include <type_traits>
#include "base/logging.h"
#include "base/numerics/safe_math_impl.h"
#include "anglebase/logging.h"
#include "anglebase/numerics/safe_math_impl.h"
namespace angle
{
......
......@@ -14,7 +14,7 @@
#include <limits>
#include <type_traits>
#include "base/numerics/safe_conversions.h"
#include "anglebase/numerics/safe_conversions.h"
namespace angle
{
......
......@@ -14,8 +14,8 @@
#include "libANGLE/Error.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/renderer/d3d/d3d11/renderer11_utils.h"
#include "third_party/mrucache/base/containers/mru_cache.h"
#include <anglebase/containers/mru_cache.h>
#include <unordered_map>
namespace gl
......
......@@ -8,7 +8,7 @@
#include "libANGLE/validationES3.h"
#include "base/numerics/safe_conversions.h"
#include "anglebase/numerics/safe_conversions.h"
#include "common/mathutil.h"
#include "common/utilities.h"
#include "libANGLE/Context.h"
......
......@@ -25,11 +25,13 @@
'common/platform.h',
'common/string_utils.cpp',
'common/string_utils.h',
'common/third_party/numerics/base/logging.h',
'common/third_party/numerics/base/numerics/safe_conversions.h',
'common/third_party/numerics/base/numerics/safe_conversions_impl.h',
'common/third_party/numerics/base/numerics/safe_math.h',
'common/third_party/numerics/base/numerics/safe_math_impl.h',
'common/third_party/base/anglebase/containers/mru_cache.h',
'common/third_party/base/anglebase/logging.h',
'common/third_party/base/anglebase/macros.h',
'common/third_party/base/anglebase/numerics/safe_conversions.h',
'common/third_party/base/anglebase/numerics/safe_conversions_impl.h',
'common/third_party/base/anglebase/numerics/safe_math.h',
'common/third_party/base/anglebase/numerics/safe_math_impl.h',
'common/tls.cpp',
'common/tls.h',
'common/utilities.cpp',
......@@ -265,9 +267,6 @@
'third_party/murmurhash/MurmurHash3.cpp',
'third_party/murmurhash/MurmurHash3.h',
'third_party/trace_event/trace_event.h',
'third_party/mrucache/base/containers/mru_cache.h',
'third_party/mrucache/base/logging.h',
'third_party/mrucache/base/macros.h',
],
'libangle_d3d_shared_sources':
[
......@@ -894,7 +893,6 @@
'.',
'../include',
'third_party/khronos',
'third_party/mrucache',
],
'sources':
[
......@@ -917,7 +915,6 @@
[
'<(angle_path)/src',
'<(angle_path)/include',
'<(angle_path)/src/third_party/mrucache',
],
'defines':
[
......
......@@ -189,6 +189,7 @@ if (is_win || is_linux) {
"//testing/gmock",
"//testing/gtest",
"//third_party/angle:angle_util_static",
"//third_party/angle:libANGLE",
"//third_party/angle:libEGL_static",
"//third_party/angle:libGLESv2_static",
]
......
Name: Chromium: base/containers/MRUCache
Short Name: base::MRUCache
Version:
URL: https://chromium.googlesource.com/chromium/src/base/+/master/containers/mru_cache.h
SOURCE CODE: Copy the Chromium folder manually into this folder and run git cl format.
Date: 24/05/2017
Revision: d20ef132b529ecce1032005476f936e05cf708c0 (Chromium)
Security Critical: no
License: Chromium
License File: LICENSE in Chromium/src
Description:
base::MRUCache is a few collections of most-recently-used caching structures.
To update the checkout, simply overwrite the folder with Chromium's latest, and apply
the appropriate namespace.
Modifications:
- base/logging.h defines CHECK to be ASSERT to be compatible with ANGLE.
- base/numerics/*.h uses namespace angle::base instead of base:: to avoid ODR
violations when ANGLE code is mixed with Chromium code.
//
// Copyright 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// logging.h: Compatiblity hacks for importing Chromium's MRUCache.
#ifndef BASE_LOGGING_H_
#define BASE_LOGGING_H_
#include "common/debug.h"
#ifndef DCHECK
#define DCHECK(X) ASSERT(X)
#endif
#ifndef CHECK
#define CHECK(X) ASSERT(X)
#endif
// Unfortunately ANGLE relies on ASSERT being an empty statement, which these libs don't respect.
#ifndef NOTREACHED
#define NOTREACHED() UNREACHABLE()
#endif
#endif // BASE_LOGGING_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment