diff options
-rw-r--r-- | o3d/core/cross/message_queue.cc | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/o3d/core/cross/message_queue.cc b/o3d/core/cross/message_queue.cc index 8cda470..139a34b 100644 --- a/o3d/core/cross/message_queue.cc +++ b/o3d/core/cross/message_queue.cc @@ -580,14 +580,15 @@ bool MessageQueue::ProcessMessageUpdateTexture2D( // Check that we will not be reading past the end of the allocated shared // memory. - if (message.offset + message.number_of_bytes > info->size) { - O3D_ERROR(service_locator_) - << "Offset + texture size exceed allocated shared memory size (" - << message.offset << " + " << message.number_of_bytes << " > " - << info->size; - SendBooleanResponse(client->client_handle(), false); - return false; - } + // TODO(gman): Comment this back in. + //if (message.offset + message.number_of_bytes > info->size) { + // O3D_ERROR(service_locator_) + // << "Offset + texture size exceed allocated shared memory size (" + // << message.offset << " + " << message.number_of_bytes << " > " + // << info->size; + // SendBooleanResponse(client->client_handle(), false); + // return false; + //} unsigned int mip_width = image::ComputeMipDimension(message.level, texture_object->width()); @@ -596,14 +597,16 @@ bool MessageQueue::ProcessMessageUpdateTexture2D( if (static_cast<unsigned>(message.number_of_bytes) != image::ComputeMipChainSize(mip_width, mip_height, - texture_object->format(), - 1)) { - O3D_ERROR(service_locator_) - << "texture_size does not match size of texture level (" - << message.offset << " + " << message.number_of_bytes << " > " - << info->size; - SendBooleanResponse(client->client_handle(), false); - return false; + texture_object->format(), 1)) { + // TODO(gman): comment this back in and return false. + //O3D_ERROR(service_locator_) + // << "texture_size does not match size of texture level (" + // << message.offset << " + " << message.number_of_bytes << " > " + // << info->size; + //SendBooleanResponse(client->client_handle(), false); + //return false; + SendBooleanResponse(client->client_handle(), true); + return true; } void *target_address = |