| OLD | NEW |
| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 Texture2DCB(ServiceLocator* service_locator, | 105 Texture2DCB(ServiceLocator* service_locator, |
| 106 command_buffer::ResourceID resource_id, | 106 command_buffer::ResourceID resource_id, |
| 107 Texture::Format format, | 107 Texture::Format format, |
| 108 int levels, | 108 int levels, |
| 109 int width, | 109 int width, |
| 110 int height, | 110 int height, |
| 111 bool enable_render_surfaces); | 111 bool enable_render_surfaces); |
| 112 | 112 |
| 113 // Returns true if the backing bitmap has the data for the level. | 113 // Returns true if the backing bitmap has the data for the level. |
| 114 bool HasLevel(unsigned int level) { | 114 bool HasLevel(unsigned int level) { |
| 115 DCHECK_LT(level, levels()); | 115 DCHECK_LT(level, static_cast<unsigned int>(levels())); |
| 116 return (has_levels_ & (1 << level)) != 0; | 116 return (has_levels_ & (1 << level)) != 0; |
| 117 } | 117 } |
| 118 | 118 |
| 119 RendererCB* renderer_; | 119 RendererCB* renderer_; |
| 120 command_buffer::ResourceID resource_id_; | 120 command_buffer::ResourceID resource_id_; |
| 121 | 121 |
| 122 // A bitmap used to back the NPOT textures on POT-only hardware, and to back | 122 // A bitmap used to back the NPOT textures on POT-only hardware, and to back |
| 123 // the pixel buffer for Lock(). | 123 // the pixel buffer for Lock(). |
| 124 Bitmap::Ref backing_bitmap_; | 124 Bitmap::Ref backing_bitmap_; |
| 125 | 125 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 TextureCUBECB(ServiceLocator* service_locator, | 185 TextureCUBECB(ServiceLocator* service_locator, |
| 186 command_buffer::ResourceID texture, | 186 command_buffer::ResourceID texture, |
| 187 Texture::Format format, | 187 Texture::Format format, |
| 188 int levels, | 188 int levels, |
| 189 int edge_length, | 189 int edge_length, |
| 190 bool enable_render_surfaces); | 190 bool enable_render_surfaces); |
| 191 | 191 |
| 192 | 192 |
| 193 // Returns true if the backing bitmap has the data for the level. | 193 // Returns true if the backing bitmap has the data for the level. |
| 194 bool HasLevel(CubeFace face, unsigned int level) { | 194 bool HasLevel(CubeFace face, unsigned int level) { |
| 195 DCHECK_LT(level, levels()); | 195 DCHECK_LT(level, static_cast<unsigned int>(levels())); |
| 196 return (has_levels_[face] & (1 << level)) != 0; | 196 return (has_levels_[face] & (1 << level)) != 0; |
| 197 } | 197 } |
| 198 | 198 |
| 199 RendererCB* renderer_; | 199 RendererCB* renderer_; |
| 200 command_buffer::ResourceID resource_id_; | 200 command_buffer::ResourceID resource_id_; |
| 201 | 201 |
| 202 // Bitmaps used to back the NPOT textures on POT-only hardware. | 202 // Bitmaps used to back the NPOT textures on POT-only hardware. |
| 203 Bitmap::Ref backing_bitmaps_[NUMBER_OF_FACES]; | 203 Bitmap::Ref backing_bitmaps_[NUMBER_OF_FACES]; |
| 204 | 204 |
| 205 // Bitfields that indicates mip levels that are currently stored in the | 205 // Bitfields that indicates mip levels that are currently stored in the |
| 206 // backing bitmap, one per face. | 206 // backing bitmap, one per face. |
| 207 unsigned int has_levels_[NUMBER_OF_FACES]; | 207 unsigned int has_levels_[NUMBER_OF_FACES]; |
| 208 | 208 |
| 209 // Bitfields that indicates which levels are currently locked, one per face. | 209 // Bitfields that indicates which levels are currently locked, one per face. |
| 210 unsigned int locked_levels_[NUMBER_OF_FACES]; | 210 unsigned int locked_levels_[NUMBER_OF_FACES]; |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 } // namespace o3d | 213 } // namespace o3d |
| 214 | 214 |
| 215 #endif // O3D_CORE_CROSS_COMMAND_BUFFER_TEXTURE_CB_H_ | 215 #endif // O3D_CORE_CROSS_COMMAND_BUFFER_TEXTURE_CB_H_ |
| OLD | NEW |