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_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <list> | 9 #include <list> |
10 #include <set> | 10 #include <set> |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 // Get the image bound to a particular level. Returns NULL if level | 140 // Get the image bound to a particular level. Returns NULL if level |
141 // does not exist. | 141 // does not exist. |
142 gfx::GLImage* GetLevelImage(GLint target, GLint level) const; | 142 gfx::GLImage* GetLevelImage(GLint target, GLint level) const; |
143 | 143 |
144 bool HasImages() const { | 144 bool HasImages() const { |
145 return has_images_; | 145 return has_images_; |
146 } | 146 } |
147 | 147 |
148 // Returns true of the given dimensions are inside the dimensions of the | 148 // Returns true of the given dimensions are inside the dimensions of the |
149 // level and if the type matches the level. | 149 // level. |
150 bool ValidForTexture( | 150 bool ValidForTexture( |
151 GLint target, | 151 GLint target, |
152 GLint level, | 152 GLint level, |
153 GLint xoffset, | 153 GLint xoffset, |
154 GLint yoffset, | 154 GLint yoffset, |
155 GLint zoffset, | 155 GLint zoffset, |
156 GLsizei width, | 156 GLsizei width, |
157 GLsizei height, | 157 GLsizei height, |
158 GLsizei depth, | 158 GLsizei depth) const; |
159 GLenum type) const; | |
160 | 159 |
161 bool IsValid() const { | 160 bool IsValid() const { |
162 return !!target(); | 161 return !!target(); |
163 } | 162 } |
164 | 163 |
165 bool IsAttachedToFramebuffer() const { | 164 bool IsAttachedToFramebuffer() const { |
166 return framebuffer_attachment_count_ != 0; | 165 return framebuffer_attachment_count_ != 0; |
167 } | 166 } |
168 | 167 |
169 void AttachToFramebuffer() { | 168 void AttachToFramebuffer() { |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 private: | 960 private: |
962 DecoderTextureState* texture_state_; | 961 DecoderTextureState* texture_state_; |
963 base::TimeTicks begin_time_; | 962 base::TimeTicks begin_time_; |
964 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); | 963 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); |
965 }; | 964 }; |
966 | 965 |
967 } // namespace gles2 | 966 } // namespace gles2 |
968 } // namespace gpu | 967 } // namespace gpu |
969 | 968 |
970 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 969 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
OLD | NEW |