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

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

Issue 1057183002: Fix a few lints found while working on crrev.com/1051503003. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More lints removed. "git cl format" reverted. Created 5 years, 8 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 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2414 GetResultShmId(), GetResultShmOffset()); 2414 GetResultShmId(), GetResultShmOffset());
2415 WaitForCmd(); 2415 WaitForCmd();
2416 if (*result) { 2416 if (*result) {
2417 if (bufsize == 0) { 2417 if (bufsize == 0) {
2418 if (length) { 2418 if (length) {
2419 *length = 0; 2419 *length = 0;
2420 } 2420 }
2421 } else if (length || name) { 2421 } else if (length || name) {
2422 std::vector<int8> str; 2422 std::vector<int8> str;
2423 GetBucketContents(kResultBucketId, &str); 2423 GetBucketContents(kResultBucketId, &str);
2424 DCHECK(str.size() > 0); 2424 DCHECK_GT(str.size(), 0u);
2425 GLsizei max_size = 2425 GLsizei max_size =
2426 std::min(bufsize, static_cast<GLsizei>(str.size())) - 1; 2426 std::min(bufsize, static_cast<GLsizei>(str.size())) - 1;
2427 if (length) { 2427 if (length) {
2428 *length = max_size; 2428 *length = max_size;
2429 } 2429 }
2430 if (name) { 2430 if (name) {
2431 memcpy(name, &str[0], max_size); 2431 memcpy(name, &str[0], max_size);
2432 name[max_size] = '\0'; 2432 name[max_size] = '\0';
2433 } 2433 }
2434 } 2434 }
(...skipping 2692 matching lines...) Expand 10 before | Expand all | Expand 10 after
5127 CheckGLError(); 5127 CheckGLError();
5128 } 5128 }
5129 5129
5130 // Include the auto-generated part of this file. We split this because it means 5130 // Include the auto-generated part of this file. We split this because it means
5131 // we can easily edit the non-auto generated parts right here in this file 5131 // we can easily edit the non-auto generated parts right here in this file
5132 // instead of having to edit some template or the code generator. 5132 // instead of having to edit some template or the code generator.
5133 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 5133 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
5134 5134
5135 } // namespace gles2 5135 } // namespace gles2
5136 } // namespace gpu 5136 } // namespace gpu
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698