Remove shared_utils.h, use angle_common instead.

*re-land with fix for Chromium compile*

This saves us from needing to replicate the same code in two places.

BUG=angleproject:956

Change-Id: I68dffee715df03bd25685e3ed5c0506ffc41c3b9
Reviewed-on: https://chromium-review.googlesource.com/263258
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
This commit is contained in:
Jamie Madill 2015-03-27 09:46:41 -04:00
Родитель f0d10f8967
Коммит 2d1eea098f
9 изменённых файлов: 24 добавлений и 52 удалений

Просмотреть файл

@ -52,13 +52,17 @@
'includes': [ '../build/common_defines.gypi', ],
'dependencies':
[
'../src/angle.gyp:libEGL',
'../src/angle.gyp:libGLESv2',
'../util/util.gyp:angle_util',
'<(angle_path)/src/angle.gyp:libEGL',
'<(angle_path)/src/angle.gyp:libGLESv2',
'<(angle_path)/util/util.gyp:angle_util',
],
'export_dependent_settings':
[
'<(angle_path)/util/util.gyp:angle_util',
],
'include_dirs':
[
'../include',
'<(angle_path)/include',
'angle/sample_util',
],
'sources':
@ -71,9 +75,7 @@
'msvs_disabled_warnings': [ 4201 ],
'include_dirs':
[
'../include',
'angle/sample_util',
'../util',
],
},
},

Просмотреть файл

@ -14,7 +14,7 @@
#include "angle_gl.h"
#include <algorithm>
#include "shared_utils.h"
#include "common/angleutils.h"
#include "shader_utils.h"
#include "testfixturetypes.h"

Просмотреть файл

@ -20,11 +20,11 @@
#include "EGLWindow.h"
#include "OSWindow.h"
#include "Timer.h"
#include "shared_utils.h"
#include "common/angleutils.h"
class Event;
class ANGLEPerfTest : public testing::Test
class ANGLEPerfTest : public testing::Test, angle::NonCopyable
{
public:
ANGLEPerfTest(const std::string &name, const std::string &suffix);
@ -32,8 +32,6 @@ class ANGLEPerfTest : public testing::Test
virtual void step(float dt, double totalTime) = 0;
DISALLOW_COPY_AND_ASSIGN(ANGLEPerfTest);
protected:
void run();
void printResult(const std::string &trace, double value, const std::string &units, bool important) const;
@ -84,8 +82,6 @@ class ANGLERenderTest : public ANGLEPerfTest
double mRunTimeSeconds;
private:
DISALLOW_COPY_AND_ASSIGN(ANGLERenderTest);
void SetUp() override;
void TearDown() override;

Просмотреть файл

@ -43,8 +43,6 @@ class BufferSubDataBenchmark : public ANGLERenderTest,
void drawBenchmark() override;
private:
DISALLOW_COPY_AND_ASSIGN(BufferSubDataBenchmark);
GLuint mProgram;
GLuint mBuffer;
uint8_t *mUpdateData;

Просмотреть файл

@ -42,8 +42,6 @@ class PointSpritesBenchmark : public ANGLERenderTest,
void drawBenchmark() override;
private:
DISALLOW_COPY_AND_ASSIGN(PointSpritesBenchmark);
GLuint mProgram;
GLuint mBuffer;
};

Просмотреть файл

@ -40,7 +40,6 @@ class TexSubImageBenchmark : public ANGLERenderTest,
void drawBenchmark() override;
private:
DISALLOW_COPY_AND_ASSIGN(TexSubImageBenchmark);
GLuint createTexture();
// Handle to a program object

Просмотреть файл

@ -21,7 +21,7 @@
#include <cstdint>
#include <memory>
#include "shared_utils.h"
#include "common/angleutils.h"
class OSWindow;
@ -43,7 +43,7 @@ struct EGLPlatformParameters
EGLPlatformParameters(EGLint renderer, EGLint majorVersion, EGLint minorVersion, EGLint deviceType);
};
class EGLWindow
class EGLWindow : angle::NonCopyable
{
public:
EGLWindow(size_t width, size_t height, EGLint glesMajorVersion, const EGLPlatformParameters &platform);
@ -85,8 +85,6 @@ class EGLWindow
void destroyGL();
private:
DISALLOW_COPY_AND_ASSIGN(EGLWindow);
EGLConfig mConfig;
EGLDisplay mDisplay;
EGLSurface mSurface;

Просмотреть файл

@ -1,24 +0,0 @@
//
// Copyright (c) 2014 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.
//
#ifndef UTIL_SHARED_UTILS_H
#define UTIL_SHARED_UTILS_H
#define SHADER_SOURCE(...) #__VA_ARGS__
// A macro to disallow the copy constructor and operator= functions
// This must be used in the private: declarations for a class
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
template <typename T, size_t N>
inline size_t ArraySize(T(&)[N])
{
return N;
}
#endif // UTIL_SHARED_UTILS_H

Просмотреть файл

@ -15,13 +15,18 @@
'includes': [ '../build/common_defines.gypi', ],
'dependencies':
[
'../src/angle.gyp:libEGL',
'../src/angle.gyp:libGLESv2',
'<(angle_path)/src/angle.gyp:angle_common',
'<(angle_path)/src/angle.gyp:libEGL',
'<(angle_path)/src/angle.gyp:libGLESv2',
],
'export_dependent_settings':
[
'<(angle_path)/src/angle.gyp:angle_common',
],
'include_dirs':
[
'../include',
'.',
'<(angle_path)/include',
'<(angle_path)/util',
],
'sources':
[
@ -32,7 +37,6 @@
'random_utils.h',
'shader_utils.cpp',
'shader_utils.h',
'shared_utils.h',
'testfixturetypes.h',
'EGLWindow.cpp',
'EGLWindow.h',
@ -51,7 +55,8 @@
{
'include_dirs':
[
'.',
'<(angle_path)/include',
'<(angle_path)/util',
],
},
},