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

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

Issue 2226193002: Not for commit: crash GPU process in glCreateGpuMemoryBufferImageCHROMIUM. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/gl2.h> 9 #include <GLES2/gl2.h>
10 #include <GLES2/gl2ext.h> 10 #include <GLES2/gl2ext.h>
(...skipping 6107 matching lines...) Expand 10 before | Expand all | Expand 10 after
6118 "invalid usage"); 6118 "invalid usage");
6119 return 0; 6119 return 0;
6120 } 6120 }
6121 6121
6122 // Flush the command stream to ensure ordering in case the newly 6122 // Flush the command stream to ensure ordering in case the newly
6123 // returned image_id has recently been in use with a different buffer. 6123 // returned image_id has recently been in use with a different buffer.
6124 helper_->CommandBufferHelper::Flush(); 6124 helper_->CommandBufferHelper::Flush();
6125 int32_t image_id = gpu_control_->CreateGpuMemoryBufferImage( 6125 int32_t image_id = gpu_control_->CreateGpuMemoryBufferImage(
6126 width, height, internalformat, usage); 6126 width, height, internalformat, usage);
6127 if (image_id < 0) { 6127 if (image_id < 0) {
6128 fprintf(stderr, "GL_OUT_OF_MEMORY in glCreateGpuMemoryBufferImageCHROMIUM\n" );
6128 SetGLError(GL_OUT_OF_MEMORY, 6129 SetGLError(GL_OUT_OF_MEMORY,
6129 "glCreateGpuMemoryBufferImageCHROMIUM", 6130 "glCreateGpuMemoryBufferImageCHROMIUM",
6130 "image_id < 0"); 6131 "image_id < 0");
6131 return 0; 6132 return 0;
6133 } else {
6134 fprintf(stderr, "Valid image_id %d in glCreateGpuMemoryBufferImageCHROMIUM\n ", (int) image_id);
6132 } 6135 }
6133 return image_id; 6136 return image_id;
6134 } 6137 }
6135 6138
6136 GLuint GLES2Implementation::CreateGpuMemoryBufferImageCHROMIUM( 6139 GLuint GLES2Implementation::CreateGpuMemoryBufferImageCHROMIUM(
6137 GLsizei width, 6140 GLsizei width,
6138 GLsizei height, 6141 GLsizei height,
6139 GLenum internalformat, 6142 GLenum internalformat,
6140 GLenum usage) { 6143 GLenum usage) {
6141 GPU_CLIENT_SINGLE_THREAD_CHECK(); 6144 GPU_CLIENT_SINGLE_THREAD_CHECK();
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
6895 cached_extensions_.clear(); 6898 cached_extensions_.clear();
6896 } 6899 }
6897 6900
6898 // Include the auto-generated part of this file. We split this because it means 6901 // Include the auto-generated part of this file. We split this because it means
6899 // we can easily edit the non-auto generated parts right here in this file 6902 // we can easily edit the non-auto generated parts right here in this file
6900 // instead of having to edit some template or the code generator. 6903 // instead of having to edit some template or the code generator.
6901 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 6904 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
6902 6905
6903 } // namespace gles2 6906 } // namespace gles2
6904 } // namespace gpu 6907 } // namespace gpu
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/gpu_integration_test.py ('k') | gpu/ipc/client/command_buffer_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698