diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-16 22:29:38 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-16 22:29:38 +0000 |
commit | 991ec6343bfd69302c3ec81f513581d08a4c9db2 (patch) | |
tree | 1578b9bb10b6bc81b4a4db8a308e9dd01ed07080 /gpu | |
parent | c3e589d9bff948422f66793eafbda3efa5652077 (diff) | |
download | chromium_src-991ec6343bfd69302c3ec81f513581d08a4c9db2.zip chromium_src-991ec6343bfd69302c3ec81f513581d08a4c9db2.tar.gz chromium_src-991ec6343bfd69302c3ec81f513581d08a4c9db2.tar.bz2 |
GPU: Make gles2_utils a separate component.
BUG=114261
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9365070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122373 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/command_buffer.gyp | 8 | ||||
-rw-r--r-- | gpu/command_buffer/common/gles2_cmd_utils.h | 6 | ||||
-rw-r--r-- | gpu/command_buffer/common/gles2_utils_export.h | 26 | ||||
-rw-r--r-- | gpu/command_buffer/common/logging.h | 6 |
4 files changed, 40 insertions, 6 deletions
diff --git a/gpu/command_buffer/command_buffer.gyp b/gpu/command_buffer/command_buffer.gyp index 3f0b815..dffac1c 100644 --- a/gpu/command_buffer/command_buffer.gyp +++ b/gpu/command_buffer/command_buffer.gyp @@ -1,4 +1,4 @@ -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 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. @@ -9,7 +9,7 @@ 'targets': [ { 'target_name': 'gles2_utils', - 'type': 'static_library', + 'type': '<(component)', 'include_dirs': [ '<(DEPTH)/third_party/khronos', ], @@ -24,10 +24,14 @@ 'export_dependent_settings': [ '../../base/base.gyp:base', ], + 'defines': [ + 'GLES2_UTILS_IMPLEMENTATION', + ], 'sources': [ 'common/gles2_cmd_format.h', 'common/gles2_cmd_utils.cc', 'common/gles2_cmd_utils.h', + 'common/gles2_utils_export.h', 'common/logging.cc', 'common/logging.h', ], diff --git a/gpu/command_buffer/common/gles2_cmd_utils.h b/gpu/command_buffer/common/gles2_cmd_utils.h index 7d62c6e..71b0577 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils.h +++ b/gpu/command_buffer/common/gles2_cmd_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -9,7 +9,9 @@ #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ #include <string> + #include "../common/types.h" +#include "gpu/command_buffer/common/gles2_utils_export.h" namespace gpu { namespace gles2 { @@ -53,7 +55,7 @@ inline bool SafeAddUint32(uint32 a, uint32 b, uint32* dst) { } // Utilties for GLES2 support. -class GLES2Util { +class GLES2_UTILS_EXPORT GLES2Util { public: static const int kNumFaces = 6; diff --git a/gpu/command_buffer/common/gles2_utils_export.h b/gpu/command_buffer/common/gles2_utils_export.h new file mode 100644 index 0000000..4031e2e --- /dev/null +++ b/gpu/command_buffer/common/gles2_utils_export.h @@ -0,0 +1,26 @@ +// Copyright (c) 2012 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 GPU_COMMAND_BUFFER_COMMON_GLES2_UTILS_EXPORT_H_ +#define GPU_COMMAND_BUFFER_COMMON_GLES2_UTILS_EXPORT_H_ +#pragma once + +#if defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(GLES2_UTILS_IMPLEMENTATION) +#define GLES2_UTILS_EXPORT __declspec(dllexport) +#else +#define GLES2_UTILS_EXPORT __declspec(dllimport) +#endif // defined(GLES2_UTILS_IMPLEMENTATION) + +#else // defined(WIN32) +#define GLES2_UTILS_EXPORT __attribute__((visibility("default"))) +#endif + +#else // defined(COMPONENT_BUILD) +#define GLES2_UTILS_EXPORT +#endif + +#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_UTILS_EXPORT_H_ diff --git a/gpu/command_buffer/common/logging.h b/gpu/command_buffer/common/logging.h index 5c806b2..2133a87 100644 --- a/gpu/command_buffer/common/logging.h +++ b/gpu/command_buffer/common/logging.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -9,6 +9,8 @@ #include <ostream> +#include "gpu/command_buffer/common/gles2_utils_export.h" + // Windows defines an ERROR macro. #ifdef ERROR #undef ERROR @@ -28,7 +30,7 @@ enum LogLevel { // This is a very simple logger for use in command buffer code. Common and // command buffer code cannot be dependent on base. It just outputs the message // to stderr. -class Logger { +class GLES2_UTILS_EXPORT Logger { public: Logger(bool condition, LogLevel level) : condition_(condition), |