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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 650303003: Avoid type truncation warnings when converting GLenum to GLboolean by inserting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
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 // A class to emulate GLES2 over command buffers. 5 // A class to emulate GLES2 over command buffers.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2ext.h> 9 #include <GLES2/gl2ext.h>
10 #include <GLES2/gl2extchromium.h> 10 #include <GLES2/gl2extchromium.h>
(...skipping 2813 matching lines...) Expand 10 before | Expand all | Expand 10 after
2824 if (!result) { 2824 if (!result) {
2825 return false; 2825 return false;
2826 } 2826 }
2827 *result = 0; 2827 *result = 0;
2828 SetBucketAsCString(kResultBucketId, feature); 2828 SetBucketAsCString(kResultBucketId, feature);
2829 helper_->EnableFeatureCHROMIUM( 2829 helper_->EnableFeatureCHROMIUM(
2830 kResultBucketId, GetResultShmId(), GetResultShmOffset()); 2830 kResultBucketId, GetResultShmId(), GetResultShmOffset());
2831 WaitForCmd(); 2831 WaitForCmd();
2832 helper_->SetBucketSize(kResultBucketId, 0); 2832 helper_->SetBucketSize(kResultBucketId, 0);
2833 GPU_CLIENT_LOG(" returned " << GLES2Util::GetStringBool(*result)); 2833 GPU_CLIENT_LOG(" returned " << GLES2Util::GetStringBool(*result));
2834 return *result; 2834 return *result != 0;
2835 } 2835 }
2836 2836
2837 void* GLES2Implementation::MapBufferSubDataCHROMIUM( 2837 void* GLES2Implementation::MapBufferSubDataCHROMIUM(
2838 GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) { 2838 GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) {
2839 GPU_CLIENT_SINGLE_THREAD_CHECK(); 2839 GPU_CLIENT_SINGLE_THREAD_CHECK();
2840 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glMapBufferSubDataCHROMIUM(" 2840 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glMapBufferSubDataCHROMIUM("
2841 << target << ", " << offset << ", " << size << ", " 2841 << target << ", " << offset << ", " << size << ", "
2842 << GLES2Util::GetStringEnum(access) << ")"); 2842 << GLES2Util::GetStringEnum(access) << ")");
2843 // NOTE: target is NOT checked because the service will check it 2843 // NOTE: target is NOT checked because the service will check it
2844 // and we don't know what targets are valid. 2844 // and we don't know what targets are valid.
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
4181 return true; 4181 return true;
4182 } 4182 }
4183 4183
4184 // Include the auto-generated part of this file. We split this because it means 4184 // Include the auto-generated part of this file. We split this because it means
4185 // we can easily edit the non-auto generated parts right here in this file 4185 // we can easily edit the non-auto generated parts right here in this file
4186 // instead of having to edit some template or the code generator. 4186 // instead of having to edit some template or the code generator.
4187 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 4187 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
4188 4188
4189 } // namespace gles2 4189 } // namespace gles2
4190 } // namespace gpu 4190 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/client/gles2_implementation_impl_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698