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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 struct LevelInfo { | 78 struct LevelInfo { |
78 LevelInfo(); | 79 LevelInfo(); |
79 LevelInfo(GLenum target, | 80 LevelInfo(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 const gfx::Rect& cleared_rect); |
88 ~LevelInfo(); | 89 ~LevelInfo(); |
89 | 90 |
90 GLenum target; | 91 GLenum target; |
91 GLenum internal_format; | 92 GLenum internal_format; |
92 GLsizei width; | 93 GLsizei width; |
93 GLsizei height; | 94 GLsizei height; |
94 GLsizei depth; | 95 GLsizei depth; |
95 GLint border; | 96 GLint border; |
96 GLenum format; | 97 GLenum format; |
97 GLenum type; | 98 GLenum type; |
98 bool cleared; | 99 gfx::Rect cleared_rect; |
99 }; | 100 }; |
100 | 101 |
101 unsigned int version_; | 102 unsigned int version_; |
102 GLenum target_; | 103 GLenum target_; |
103 scoped_refptr<NativeImageBuffer> image_buffer_; | 104 scoped_refptr<NativeImageBuffer> image_buffer_; |
104 GLenum min_filter_; | 105 GLenum min_filter_; |
105 GLenum mag_filter_; | 106 GLenum mag_filter_; |
106 GLenum wrap_s_; | 107 GLenum wrap_s_; |
107 GLenum wrap_t_; | 108 GLenum wrap_t_; |
108 GLenum usage_; | 109 GLenum usage_; |
109 bool immutable_; | 110 bool immutable_; |
110 bool defined_; | 111 bool defined_; |
111 | 112 |
112 // Only support textures with one face and one level. | 113 // Only support textures with one face and one level. |
113 LevelInfo level_info_; | 114 LevelInfo level_info_; |
114 }; | 115 }; |
115 | 116 |
116 } // namespage gles2 | 117 } // namespage gles2 |
117 } // namespace gpu | 118 } // namespace gpu |
118 | 119 |
119 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ | 120 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ |
OLD | NEW |