Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: core/cross/gl/texture_gl.h

Issue 159168: This fixes a number of things that are warnings in the Mac compiler.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 const Bitmap &bitmap, 112 const Bitmap &bitmap,
113 bool resize_npot, 113 bool resize_npot,
114 bool enable_render_surfaces); 114 bool enable_render_surfaces);
115 115
116 // Updates a mip level, sending it from the backing bitmap to GL, rescaling 116 // Updates a mip level, sending it from the backing bitmap to GL, rescaling
117 // it if resize_to_pot_ is set. 117 // it if resize_to_pot_ is set.
118 void UpdateBackedMipLevel(unsigned int level); 118 void UpdateBackedMipLevel(unsigned int level);
119 119
120 // Returns true if the backing bitmap has the data for the level. 120 // Returns true if the backing bitmap has the data for the level.
121 bool HasLevel(unsigned int level) const { 121 bool HasLevel(unsigned int level) const {
122 DCHECK_LT(level, levels()); 122 DCHECK_LT(static_cast<int>(level), levels());
123 return (has_levels_ & (1 << level)) != 0; 123 return (has_levels_ & (1 << level)) != 0;
124 } 124 }
125 125
126 RendererGL* renderer_; 126 RendererGL* renderer_;
127 127
128 // The handle of the OpenGL texture object. 128 // The handle of the OpenGL texture object.
129 GLuint gl_texture_; 129 GLuint gl_texture_;
130 130
131 // A bitmap used to back the NPOT textures on POT-only hardware, and to back 131 // A bitmap used to back the NPOT textures on POT-only hardware, and to back
132 // the pixel buffer for Lock(). 132 // the pixel buffer for Lock().
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 const Bitmap &bitmap, 189 const Bitmap &bitmap,
190 bool resize_to_pot, 190 bool resize_to_pot,
191 bool enable_render_surfaces); 191 bool enable_render_surfaces);
192 192
193 // Updates a mip level, sending it from the backing bitmap to GL, rescaling 193 // Updates a mip level, sending it from the backing bitmap to GL, rescaling
194 // it if resize_to_pot_ is set. 194 // it if resize_to_pot_ is set.
195 void UpdateBackedMipLevel(unsigned int level, CubeFace face); 195 void UpdateBackedMipLevel(unsigned int level, CubeFace face);
196 196
197 // Returns true if the backing bitmap has the data for the level. 197 // Returns true if the backing bitmap has the data for the level.
198 bool HasLevel(unsigned int level, CubeFace face) const { 198 bool HasLevel(unsigned int level, CubeFace face) const {
199 DCHECK_LT(level, levels()); 199 DCHECK_LT(static_cast<int>(level), levels());
200 return (has_levels_[face] & (1 << level)) != 0; 200 return (has_levels_[face] & (1 << level)) != 0;
201 } 201 }
202 202
203 RendererGL* renderer_; 203 RendererGL* renderer_;
204 204
205 // The handle of the OpenGL texture object. 205 // The handle of the OpenGL texture object.
206 GLuint gl_texture_; 206 GLuint gl_texture_;
207 207
208 // A bitmap used to back the NPOT textures on POT-only hardware, and to back 208 // A bitmap used to back the NPOT textures on POT-only hardware, and to back
209 // the pixel buffer for Lock(). 209 // the pixel buffer for Lock().
210 Bitmap::Ref backing_bitmap_; 210 Bitmap::Ref backing_bitmap_;
211 211
212 // Bitfields that indicates mip levels that are currently stored in the 212 // Bitfields that indicates mip levels that are currently stored in the
213 // backing bitmap, one per face. 213 // backing bitmap, one per face.
214 unsigned int has_levels_[6]; 214 unsigned int has_levels_[6];
215 }; 215 };
216 216
217 } // namespace o3d 217 } // namespace o3d
218 218
219 #endif // O3D_CORE_CROSS_GL_TEXTURE_GL_H__ 219 #endif // O3D_CORE_CROSS_GL_TEXTURE_GL_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698