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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 822713002: Update from https://crrev.com/309415 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 12 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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 PerformanceWarning(__FILE__, __LINE__, msg) 191 PerformanceWarning(__FILE__, __LINE__, msg)
192 #define LOCAL_RENDER_WARNING(msg) \ 192 #define LOCAL_RENDER_WARNING(msg) \
193 RenderWarning(__FILE__, __LINE__, msg) 193 RenderWarning(__FILE__, __LINE__, msg)
194 194
195 // Check that certain assumptions the code makes are true. There are places in 195 // Check that certain assumptions the code makes are true. There are places in
196 // the code where shared memory is passed direclty to GL. Example, glUniformiv, 196 // the code where shared memory is passed direclty to GL. Example, glUniformiv,
197 // glShaderSource. The command buffer code assumes GLint and GLsizei (and maybe 197 // glShaderSource. The command buffer code assumes GLint and GLsizei (and maybe
198 // a few others) are 32bits. If they are not 32bits the code will have to change 198 // a few others) are 32bits. If they are not 32bits the code will have to change
199 // to call those GL functions with service side memory and then copy the results 199 // to call those GL functions with service side memory and then copy the results
200 // to shared memory, converting the sizes. 200 // to shared memory, converting the sizes.
201 COMPILE_ASSERT(sizeof(GLint) == sizeof(uint32), // NOLINT 201 static_assert(sizeof(GLint) == sizeof(uint32), // NOLINT
202 GLint_not_same_size_as_uint32); 202 "GLint should be the same size as uint32");
203 COMPILE_ASSERT(sizeof(GLsizei) == sizeof(uint32), // NOLINT 203 static_assert(sizeof(GLsizei) == sizeof(uint32), // NOLINT
204 GLint_not_same_size_as_uint32); 204 "GLsizei should be the same size as uint32");
205 COMPILE_ASSERT(sizeof(GLfloat) == sizeof(float), // NOLINT 205 static_assert(sizeof(GLfloat) == sizeof(float), // NOLINT
206 GLfloat_not_same_size_as_float); 206 "GLfloat should be the same size as float");
207 207
208 // TODO(kbr): the use of this anonymous namespace core dumps the 208 // TODO(kbr): the use of this anonymous namespace core dumps the
209 // linker on Mac OS X 10.6 when the symbol ordering file is used 209 // linker on Mac OS X 10.6 when the symbol ordering file is used
210 // namespace { 210 // namespace {
211 211
212 // Returns the address of the first byte after a struct. 212 // Returns the address of the first byte after a struct.
213 template <typename T> 213 template <typename T>
214 const void* AddressAfterStruct(const T& pod) { 214 const void* AddressAfterStruct(const T& pod) {
215 return reinterpret_cast<const uint8*>(&pod) + sizeof(pod); 215 return reinterpret_cast<const uint8*>(&pod) + sizeof(pod);
216 } 216 }
(...skipping 11344 matching lines...) Expand 10 before | Expand all | Expand 10 after
11561 } 11561 }
11562 } 11562 }
11563 11563
11564 // Include the auto-generated part of this file. We split this because it means 11564 // Include the auto-generated part of this file. We split this because it means
11565 // we can easily edit the non-auto generated parts right here in this file 11565 // we can easily edit the non-auto generated parts right here in this file
11566 // instead of having to edit some template or the code generator. 11566 // instead of having to edit some template or the code generator.
11567 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 11567 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
11568 11568
11569 } // namespace gles2 11569 } // namespace gles2
11570 } // namespace gpu 11570 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698