OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "gpu/command_buffer/service/gl_utils.h" | 11 #include "gpu/command_buffer/service/gl_utils.h" |
| 12 #include "ui/gfx/geometry/rect.h" |
12 | 13 |
13 namespace gfx { | 14 namespace gfx { |
14 class GLImage; | 15 class GLImage; |
15 } | 16 } |
16 | 17 |
17 namespace gpu { | 18 namespace gpu { |
18 namespace gles2 { | 19 namespace gles2 { |
19 | 20 |
20 class Texture; | 21 class Texture; |
21 | 22 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 struct LevelInfo { | 67 struct LevelInfo { |
67 LevelInfo(); | 68 LevelInfo(); |
68 LevelInfo(GLenum target, | 69 LevelInfo(GLenum target, |
69 GLenum internal_format, | 70 GLenum internal_format, |
70 GLsizei width, | 71 GLsizei width, |
71 GLsizei height, | 72 GLsizei height, |
72 GLsizei depth, | 73 GLsizei depth, |
73 GLint border, | 74 GLint border, |
74 GLenum format, | 75 GLenum format, |
75 GLenum type, | 76 GLenum type, |
76 bool cleared); | 77 const gfx::Rect& cleared_rect); |
77 ~LevelInfo(); | 78 ~LevelInfo(); |
78 | 79 |
79 GLenum target; | 80 GLenum target; |
80 GLenum internal_format; | 81 GLenum internal_format; |
81 GLsizei width; | 82 GLsizei width; |
82 GLsizei height; | 83 GLsizei height; |
83 GLsizei depth; | 84 GLsizei depth; |
84 GLint border; | 85 GLint border; |
85 GLenum format; | 86 GLenum format; |
86 GLenum type; | 87 GLenum type; |
87 bool cleared; | 88 gfx::Rect cleared_rect; |
88 }; | 89 }; |
89 | 90 |
90 unsigned int version_; | 91 unsigned int version_; |
91 GLenum target_; | 92 GLenum target_; |
92 scoped_refptr<NativeImageBuffer> image_buffer_; | 93 scoped_refptr<NativeImageBuffer> image_buffer_; |
93 GLenum min_filter_; | 94 GLenum min_filter_; |
94 GLenum mag_filter_; | 95 GLenum mag_filter_; |
95 GLenum wrap_s_; | 96 GLenum wrap_s_; |
96 GLenum wrap_t_; | 97 GLenum wrap_t_; |
97 GLenum usage_; | 98 GLenum usage_; |
98 bool immutable_; | 99 bool immutable_; |
99 bool defined_; | 100 bool defined_; |
100 | 101 |
101 // Only support textures with one face and one level. | 102 // Only support textures with one face and one level. |
102 LevelInfo level_info_; | 103 LevelInfo level_info_; |
103 }; | 104 }; |
104 | 105 |
105 } // namespage gles2 | 106 } // namespage gles2 |
106 } // namespace gpu | 107 } // namespace gpu |
107 | 108 |
108 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ | 109 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ |
OLD | NEW |