Chromium Code Reviews| Index: gpu/command_buffer/service/texture_definition.h |
| =================================================================== |
| --- gpu/command_buffer/service/texture_definition.h (revision 0) |
| +++ gpu/command_buffer/service/texture_definition.h (revision 0) |
| @@ -0,0 +1,75 @@ |
| +// 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_SERVICE_TEXTURE_DEFINITION_H_ |
| +#define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/callback.h" |
| +#include "gpu/command_buffer/service/gl_utils.h" |
| +#include "gpu/gpu_export.h" |
| + |
| +namespace gpu { |
| +namespace gles2 { |
| + |
| +// A saved definition of a texture that still exists in the underlying |
| +// GLShareGroup and can be used to redefine a client visible texture in any |
| +// context in using the same GLShareGroup with the corresponding service ID. |
|
Ken Russell (switch to Gerrit)
2012/04/26 22:34:14
"in using" -> "using"
apatrick_chromium
2012/04/27 22:31:58
Done.
|
| +class GPU_EXPORT TextureDefinition { |
| + public: |
| + struct LevelInfo { |
| + LevelInfo(GLenum target, |
| + GLenum internal_format, |
| + GLsizei width, |
| + GLsizei height, |
| + GLsizei depth, |
| + GLint border, |
| + GLenum format, |
| + GLenum type, |
| + bool cleared); |
| + GLenum target; |
| + GLenum internal_format; |
| + GLsizei width; |
| + GLsizei height; |
| + GLsizei depth; |
| + GLint border; |
| + GLenum format; |
| + GLenum type; |
| + bool cleared; |
| + }; |
| + |
| + typedef std::vector<std::vector<LevelInfo> > LevelInfos; |
| + |
| + typedef base::Callback<void(TextureDefinition*)> DestroyCallback; |
| + |
| + TextureDefinition(GLenum target, |
| + GLuint service_id, |
| + const LevelInfos& level_infos); |
| + ~TextureDefinition(); |
| + |
| + GLenum target() const { |
| + return target_; |
| + } |
| + |
| + GLuint ReleaseServiceId(); |
| + |
| + const LevelInfos& level_infos() const { |
| + return level_infos_; |
| + } |
| + |
| + private: |
| + GLenum target_; |
| + GLuint service_id_; |
| + std::vector<std::vector<LevelInfo> > level_infos_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TextureDefinition); |
| +}; |
| + |
| +} // namespage gles2 |
| +} // namespace gpu |
| + |
| +#endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ |
| + |
| + |
| Property changes on: gpu\command_buffer\service\texture_definition.h |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |