OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "gpu/command_buffer/service/gl_utils.h" | 11 #include "gpu/command_buffer/service/gl_utils.h" |
12 #include "gpu/gpu_export.h" | 12 #include "gpu/gpu_export.h" |
13 | 13 |
14 namespace gpu { | 14 namespace gpu { |
15 namespace gles2 { | 15 namespace gles2 { |
16 | 16 |
17 // A saved definition of a texture that still exists in the underlying | 17 // A saved definition of a texture that still exists in the underlying |
18 // GLShareGroup and can be used to redefine a client visible texture in any | 18 // GLShareGroup and can be used to redefine a client visible texture in any |
19 // context using the same GLShareGroup with the corresponding service ID. | 19 // context using the same GLShareGroup with the corresponding service ID. |
20 class GPU_EXPORT TextureDefinition { | 20 class GPU_EXPORT TextureDefinition { |
21 public: | 21 public: |
22 struct GPU_EXPORT LevelInfo { | 22 struct LevelInfo { |
23 LevelInfo(GLenum target, | 23 LevelInfo(GLenum target, |
24 GLenum internal_format, | 24 GLenum internal_format, |
25 GLsizei width, | 25 GLsizei width, |
26 GLsizei height, | 26 GLsizei height, |
27 GLsizei depth, | 27 GLsizei depth, |
28 GLint border, | 28 GLint border, |
29 GLenum format, | 29 GLenum format, |
30 GLenum type, | 30 GLenum type, |
31 bool cleared); | 31 bool cleared); |
32 LevelInfo(); | |
33 | |
34 GLenum target; | 32 GLenum target; |
35 GLenum internal_format; | 33 GLenum internal_format; |
36 GLsizei width; | 34 GLsizei width; |
37 GLsizei height; | 35 GLsizei height; |
38 GLsizei depth; | 36 GLsizei depth; |
39 GLint border; | 37 GLint border; |
40 GLenum format; | 38 GLenum format; |
41 GLenum type; | 39 GLenum type; |
42 bool cleared; | 40 bool cleared; |
43 }; | 41 }; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 bool immutable_; | 83 bool immutable_; |
86 std::vector<std::vector<LevelInfo> > level_infos_; | 84 std::vector<std::vector<LevelInfo> > level_infos_; |
87 | 85 |
88 DISALLOW_COPY_AND_ASSIGN(TextureDefinition); | 86 DISALLOW_COPY_AND_ASSIGN(TextureDefinition); |
89 }; | 87 }; |
90 | 88 |
91 } // namespage gles2 | 89 } // namespage gles2 |
92 } // namespace gpu | 90 } // namespace gpu |
93 | 91 |
94 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ | 92 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ |
OLD | NEW |