diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-08 22:58:58 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-08 22:58:58 +0000 |
commit | 9f427328e5f5794d29b4b4fbf2439f0ba86daa0e (patch) | |
tree | 8a45c0bddc83cab50a6cc5462f98890eaf750a73 /gpu/command_buffer/client | |
parent | 3fb28bac3a97af687de76d830d42fe974422f910 (diff) | |
download | chromium_src-9f427328e5f5794d29b4b4fbf2439f0ba86daa0e.zip chromium_src-9f427328e5f5794d29b4b4fbf2439f0ba86daa0e.tar.gz chromium_src-9f427328e5f5794d29b4b4fbf2439f0ba86daa0e.tar.bz2 |
Rearrange GLES2 files so they are easier to use
from native client and pepper.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/668205
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40956 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/client')
-rw-r--r-- | gpu/command_buffer/client/cmd_buffer_helper.cc | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/cmd_buffer_helper.h | 8 | ||||
-rw-r--r-- | gpu/command_buffer/client/fenced_allocator.cc | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/fenced_allocator.h | 3 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_c_lib.cc | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_cmd_helper.cc | 2 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_cmd_helper.h | 6 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_demo_cc.cc | 7 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.cc | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.h | 10 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_lib.cc | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_lib.h | 2 | ||||
-rw-r--r-- | gpu/command_buffer/client/id_allocator.cc | 3 | ||||
-rw-r--r-- | gpu/command_buffer/client/id_allocator.h | 9 |
14 files changed, 38 insertions, 32 deletions
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.cc b/gpu/command_buffer/client/cmd_buffer_helper.cc index ed04e30..4f9d725 100644 --- a/gpu/command_buffer/client/cmd_buffer_helper.cc +++ b/gpu/command_buffer/client/cmd_buffer_helper.cc @@ -4,8 +4,8 @@ // This file contains the implementation of the command buffer helper class. -#include "gpu/command_buffer/client/cmd_buffer_helper.h" -#include "gpu/command_buffer/common/command_buffer.h" +#include "../client/cmd_buffer_helper.h" +#include "../common/command_buffer.h" namespace gpu { diff --git a/gpu/command_buffer/client/cmd_buffer_helper.h b/gpu/command_buffer/client/cmd_buffer_helper.h index c65a23a..62d689c 100644 --- a/gpu/command_buffer/client/cmd_buffer_helper.h +++ b/gpu/command_buffer/client/cmd_buffer_helper.h @@ -7,10 +7,10 @@ #ifndef GPU_COMMAND_BUFFER_CLIENT_CMD_BUFFER_HELPER_H_ #define GPU_COMMAND_BUFFER_CLIENT_CMD_BUFFER_HELPER_H_ -#include "gpu/command_buffer/common/logging.h" -#include "gpu/command_buffer/common/constants.h" -#include "gpu/command_buffer/common/cmd_buffer_common.h" -#include "gpu/command_buffer/common/command_buffer.h" +#include "../common/logging.h" +#include "../common/constants.h" +#include "../common/cmd_buffer_common.h" +#include "../common/command_buffer.h" namespace gpu { diff --git a/gpu/command_buffer/client/fenced_allocator.cc b/gpu/command_buffer/client/fenced_allocator.cc index 8cc6761..57a35fde 100644 --- a/gpu/command_buffer/client/fenced_allocator.cc +++ b/gpu/command_buffer/client/fenced_allocator.cc @@ -4,9 +4,9 @@ // This file contains the implementation of the FencedAllocator class. -#include "gpu/command_buffer/client/fenced_allocator.h" +#include "../client/fenced_allocator.h" #include <algorithm> -#include "gpu/command_buffer/client/cmd_buffer_helper.h" +#include "../client/cmd_buffer_helper.h" namespace gpu { diff --git a/gpu/command_buffer/client/fenced_allocator.h b/gpu/command_buffer/client/fenced_allocator.h index ab68c1a..8f69743 100644 --- a/gpu/command_buffer/client/fenced_allocator.h +++ b/gpu/command_buffer/client/fenced_allocator.h @@ -8,8 +8,7 @@ #define GPU_COMMAND_BUFFER_CLIENT_FENCED_ALLOCATOR_H_ #include <vector> -#include "base/basictypes.h" -#include "gpu/command_buffer/common/logging.h" +#include "../common/logging.h" namespace gpu { class CommandBufferHelper; diff --git a/gpu/command_buffer/client/gles2_c_lib.cc b/gpu/command_buffer/client/gles2_c_lib.cc index 305e93cc..74cc431 100644 --- a/gpu/command_buffer/client/gles2_c_lib.cc +++ b/gpu/command_buffer/client/gles2_c_lib.cc @@ -4,13 +4,13 @@ // These functions emluate GLES2 over command buffers for C. -#include "gpu/command_buffer/client/gles2_lib.h" +#include "../client/gles2_lib.h" extern "C" { // Include the auto-generated part of this file. We split this because it means // we can easily edit the non-auto generated parts right here in this file // instead of having to edit some template or the code generator. -#include "gpu/command_buffer/client/gles2_c_lib_autogen.h" +#include "../client/gles2_c_lib_autogen.h" } // extern "C" diff --git a/gpu/command_buffer/client/gles2_cmd_helper.cc b/gpu/command_buffer/client/gles2_cmd_helper.cc index a3d58d6..8f2bf45 100644 --- a/gpu/command_buffer/client/gles2_cmd_helper.cc +++ b/gpu/command_buffer/client/gles2_cmd_helper.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "gpu/command_buffer/client/gles2_cmd_helper.h" +#include "../client/gles2_cmd_helper.h" namespace gpu { diff --git a/gpu/command_buffer/client/gles2_cmd_helper.h b/gpu/command_buffer/client/gles2_cmd_helper.h index 015ce0e..a4f31aa 100644 --- a/gpu/command_buffer/client/gles2_cmd_helper.h +++ b/gpu/command_buffer/client/gles2_cmd_helper.h @@ -5,8 +5,8 @@ #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_H_ #define GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_H_ -#include "gpu/command_buffer/client/cmd_buffer_helper.h" -#include "gpu/command_buffer/common/gles2_cmd_format.h" +#include "../client/cmd_buffer_helper.h" +#include "../common/gles2_cmd_format.h" namespace gpu { namespace gles2 { @@ -23,7 +23,7 @@ class GLES2CmdHelper : public CommandBufferHelper { // Include the auto-generated part of this class. We split this because it // means we can easily edit the non-auto generated parts right here in this // file instead of having to edit some template or the code generator. - #include "gpu/command_buffer/client/gles2_cmd_helper_autogen.h" + #include "../client/gles2_cmd_helper_autogen.h" // Helpers that could not be auto-generated. // TODO(gman): Auto generate these. diff --git a/gpu/command_buffer/client/gles2_demo_cc.cc b/gpu/command_buffer/client/gles2_demo_cc.cc index 43115ef..acb5be3 100644 --- a/gpu/command_buffer/client/gles2_demo_cc.cc +++ b/gpu/command_buffer/client/gles2_demo_cc.cc @@ -9,10 +9,13 @@ #include "gpu/command_buffer/common/logging.h" #include <math.h> -#include <GLES2/gl2.h> - #include <string> +// This is here so we have at least some idea that the inline path is working. +#define GLES2_INLINE_OPTIMIZATION +#include <GLES2/gl2.h> +#include "gpu/command_buffer/common/logging.h" + namespace { GLuint g_texture = 0; diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 8e212d6..f7bf3ad 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -4,8 +4,8 @@ // A class to emluate GLES2 over command buffers. -#include "gpu/command_buffer/client/gles2_implementation.h" -#include "gpu/command_buffer/common/gles2_cmd_utils.h" +#include "../client/gles2_implementation.h" +#include "../common/gles2_cmd_utils.h" namespace gpu { namespace gles2 { diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h index 339ed4b..bb69353 100644 --- a/gpu/command_buffer/client/gles2_implementation.h +++ b/gpu/command_buffer/client/gles2_implementation.h @@ -8,10 +8,10 @@ #include <map> #include <string> #include <vector> -#include "gpu/command_buffer/common/gles2_cmd_utils.h" -#include "gpu/command_buffer/client/gles2_cmd_helper.h" -#include "gpu/command_buffer/client/id_allocator.h" -#include "gpu/command_buffer/client/fenced_allocator.h" +#include "../common/gles2_cmd_utils.h" +#include "../client/gles2_cmd_helper.h" +#include "../client/id_allocator.h" +#include "../client/fenced_allocator.h" namespace gpu { namespace gles2 { @@ -41,7 +41,7 @@ class GLES2Implementation { // Include the auto-generated part of this class. We split this because // it means we can easily edit the non-auto generated parts right here in // this file instead of having to edit some template or the code generator. - #include "gpu/command_buffer/client/gles2_implementation_autogen.h" + #include "../client/gles2_implementation_autogen.h" private: // Makes a set of Ids for glGen___ functions. diff --git a/gpu/command_buffer/client/gles2_lib.cc b/gpu/command_buffer/client/gles2_lib.cc index 5753715..d80d4e1 100644 --- a/gpu/command_buffer/client/gles2_lib.cc +++ b/gpu/command_buffer/client/gles2_lib.cc @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "gpu/command_buffer/client/gles2_lib.h" -#include "gpu/command_buffer/common/thread_local.h" +#include "../client/gles2_lib.h" +#include "../common/thread_local.h" namespace gles2 { namespace { diff --git a/gpu/command_buffer/client/gles2_lib.h b/gpu/command_buffer/client/gles2_lib.h index 2242cc8..799cd4e 100644 --- a/gpu/command_buffer/client/gles2_lib.h +++ b/gpu/command_buffer/client/gles2_lib.h @@ -7,7 +7,7 @@ #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_ #define GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_ -#include "gpu/command_buffer/client/gles2_implementation.h" +#include "../client/gles2_implementation.h" namespace gles2 { diff --git a/gpu/command_buffer/client/id_allocator.cc b/gpu/command_buffer/client/id_allocator.cc index 64796e9..e6f9b6c 100644 --- a/gpu/command_buffer/client/id_allocator.cc +++ b/gpu/command_buffer/client/id_allocator.cc @@ -4,7 +4,8 @@ // This file contains the implementation of IdAllocator. -#include "gpu/command_buffer/client/id_allocator.h" +#include "../client/id_allocator.h" +#include "../common/logging.h" namespace gpu { diff --git a/gpu/command_buffer/client/id_allocator.h b/gpu/command_buffer/client/id_allocator.h index 2731366..8e1ccdb 100644 --- a/gpu/command_buffer/client/id_allocator.h +++ b/gpu/command_buffer/client/id_allocator.h @@ -8,12 +8,15 @@ #define GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_ #include <vector> -#include "base/basictypes.h" -#include "gpu/command_buffer/common/types.h" -#include "gpu/command_buffer/common/resource.h" +#include "../common/types.h" namespace gpu { +// A resource ID, key to the resource maps. +typedef uint32 ResourceId; +// Invalid resource ID. +static const ResourceId kInvalidResource = 0xffffffffU; + // A class to manage the allocation of resource IDs. It uses a bitfield stored // into a vector of unsigned ints. class IdAllocator { |