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

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

Issue 1417853006: gpu: introduce glSetStreamTextureSizeCHROMIUM(GLuint texture, GLint stream_id, GLsizei width, GLsiz… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android_webview.test failure Created 5 years, 1 month 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 4824 matching lines...) Expand 10 before | Expand all | Expand 10 after
4835 return; 4835 return;
4836 } 4836 }
4837 if (static_cast<size_t>(bufsize) < result.size()) { 4837 if (static_cast<size_t>(bufsize) < result.size()) {
4838 SetGLError(GL_INVALID_OPERATION, "glGetTransformFeedbackVaryingsCHROMIUM", 4838 SetGLError(GL_INVALID_OPERATION, "glGetTransformFeedbackVaryingsCHROMIUM",
4839 "bufsize is too small for result."); 4839 "bufsize is too small for result.");
4840 return; 4840 return;
4841 } 4841 }
4842 memcpy(info, &result[0], result.size()); 4842 memcpy(info, &result[0], result.size());
4843 } 4843 }
4844 4844
4845 GLuint GLES2Implementation::CreateStreamTextureCHROMIUM(GLuint texture) { 4845 GLint GLES2Implementation::CreateStreamTextureCHROMIUM(GLuint texture) {
4846 GPU_CLIENT_SINGLE_THREAD_CHECK(); 4846 GPU_CLIENT_SINGLE_THREAD_CHECK();
4847 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] CreateStreamTextureCHROMIUM(" 4847 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] CreateStreamTextureCHROMIUM("
4848 << texture << ")"); 4848 << texture << ")");
4849 TRACE_EVENT0("gpu", "GLES2::CreateStreamTextureCHROMIUM"); 4849 TRACE_EVENT0("gpu", "GLES2::CreateStreamTextureCHROMIUM");
4850 helper_->CommandBufferHelper::Flush(); 4850 helper_->CommandBufferHelper::Flush();
4851 return gpu_control_->CreateStreamTexture(texture); 4851 return gpu_control_->CreateStreamTexture(texture);
4852 } 4852 }
4853 4853
4854 void GLES2Implementation::SetStreamTextureSizeCHROMIUM(GLuint texture,
4855 GLint stream_id,
4856 GLsizei width,
4857 GLsizei height) {
4858 GPU_CLIENT_SINGLE_THREAD_CHECK();
4859 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] SetStreamTextureSizeCHROMIUM("
4860 << texture << ", " << stream_id << ", " << width << ","
4861 << height << ")");
4862 TRACE_EVENT0("gpu", "GLES2::SetStreamTextureSizeCHROMIUM");
4863 return gpu_control_->SetStreamTextureSize(texture, stream_id, width, height);
4864 }
4865
4854 void GLES2Implementation::PostSubBufferCHROMIUM( 4866 void GLES2Implementation::PostSubBufferCHROMIUM(
4855 GLint x, GLint y, GLint width, GLint height) { 4867 GLint x, GLint y, GLint width, GLint height) {
4856 GPU_CLIENT_SINGLE_THREAD_CHECK(); 4868 GPU_CLIENT_SINGLE_THREAD_CHECK();
4857 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] PostSubBufferCHROMIUM(" 4869 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] PostSubBufferCHROMIUM("
4858 << x << ", " << y << ", " << width << ", " << height << ")"); 4870 << x << ", " << y << ", " << width << ", " << height << ")");
4859 TRACE_EVENT2("gpu", "GLES2::PostSubBufferCHROMIUM", 4871 TRACE_EVENT2("gpu", "GLES2::PostSubBufferCHROMIUM",
4860 "width", width, "height", height); 4872 "width", width, "height", height);
4861 4873
4862 // Same flow control as GLES2Implementation::SwapBuffers (see comments there). 4874 // Same flow control as GLES2Implementation::SwapBuffers (see comments there).
4863 swap_buffers_tokens_.push(helper_->InsertToken()); 4875 swap_buffers_tokens_.push(helper_->InsertToken());
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
6361 CheckGLError(); 6373 CheckGLError();
6362 } 6374 }
6363 6375
6364 // Include the auto-generated part of this file. We split this because it means 6376 // Include the auto-generated part of this file. We split this because it means
6365 // we can easily edit the non-auto generated parts right here in this file 6377 // we can easily edit the non-auto generated parts right here in this file
6366 // instead of having to edit some template or the code generator. 6378 // instead of having to edit some template or the code generator.
6367 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 6379 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
6368 6380
6369 } // namespace gles2 6381 } // namespace gles2
6370 } // namespace gpu 6382 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698