diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-22 00:09:28 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-22 00:09:28 +0000 |
commit | 6673317aabd12e4575027ed300d006f9e2bc3824 (patch) | |
tree | a8d889c3d1e3590d98e731dc55ba8963ff1f335e /gpu/command_buffer | |
parent | 1804aa715fd72666c7c22d2cf6a773ecbd6eb43d (diff) | |
download | chromium_src-6673317aabd12e4575027ed300d006f9e2bc3824.zip chromium_src-6673317aabd12e4575027ed300d006f9e2bc3824.tar.gz chromium_src-6673317aabd12e4575027ed300d006f9e2bc3824.tar.bz2 |
Mac: clang build
Fixes the last few warnings / errors necessary to build chrome/mac with clang.
See http://code.google.com/p/chromium/wiki/Clang
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2762014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60131 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer')
-rw-r--r-- | gpu/command_buffer/client/fenced_allocator.h | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.cc | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/gpu/command_buffer/client/fenced_allocator.h b/gpu/command_buffer/client/fenced_allocator.h index fb97e37..fd162db41 100644 --- a/gpu/command_buffer/client/fenced_allocator.h +++ b/gpu/command_buffer/client/fenced_allocator.h @@ -212,7 +212,9 @@ class FencedAllocatorWrapper { // Gets the offset to a memory block given the base memory and the address. // It translates NULL to FencedAllocator::kInvalidOffset. FencedAllocator::Offset GetOffset(void *pointer) { - return pointer ? static_cast<char *>(pointer) - static_cast<char *>(base_) : + return pointer ? + static_cast<FencedAllocator::Offset>( + static_cast<char*>(pointer) - static_cast<char*>(base_)) : FencedAllocator::kInvalidOffset; } diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 6dad4e2..58ddd2b 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -311,8 +311,8 @@ class ClientSideBufferHelper { size_t bytes_per_element = GLES2Util::GetGLTypeSizeForTexturesAndBuffers(info.type()) * info.size(); - GLsizei real_stride = - info.stride() ? info.stride() : bytes_per_element; + GLsizei real_stride = info.stride() ? + info.stride() : static_cast<GLsizei>(bytes_per_element); GLsizei bytes_collected = CollectData( info.pointer(), bytes_per_element, real_stride, num_elements); gl->BufferSubData( @@ -814,8 +814,8 @@ void GLES2Implementation::ShaderSource( uint32 total_size = 1; for (GLsizei ii = 0; ii < count; ++ii) { if (source[ii]) { - total_size += - (length && length[ii] >= 0) ? length[ii] : strlen(source[ii]); + total_size += (length && length[ii] >= 0) ? + static_cast<size_t>(length[ii]) : strlen(source[ii]); } } @@ -826,7 +826,8 @@ void GLES2Implementation::ShaderSource( for (GLsizei ii = 0; ii <= count; ++ii) { const char* src = ii < count ? source[ii] : ""; if (src) { - uint32 size = ii < count ? (length ? length[ii] : strlen(src)) : 1; + uint32 size = ii < count ? + (length ? static_cast<size_t>(length[ii]) : strlen(src)) : 1; while (size) { uint32 part_size = std::min(size, max_size); void* buffer = transfer_buffer_.Alloc(part_size); |