OLD | NEW |
---|---|
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 <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1665 bool DoIsTransformFeedback(GLuint client_id); | 1665 bool DoIsTransformFeedback(GLuint client_id); |
1666 bool DoIsVertexArrayOES(GLuint client_id); | 1666 bool DoIsVertexArrayOES(GLuint client_id); |
1667 bool DoIsPathCHROMIUM(GLuint client_id); | 1667 bool DoIsPathCHROMIUM(GLuint client_id); |
1668 bool DoIsSync(GLuint client_id); | 1668 bool DoIsSync(GLuint client_id); |
1669 | 1669 |
1670 void DoLineWidth(GLfloat width); | 1670 void DoLineWidth(GLfloat width); |
1671 | 1671 |
1672 // Wrapper for glLinkProgram | 1672 // Wrapper for glLinkProgram |
1673 void DoLinkProgram(GLuint program); | 1673 void DoLinkProgram(GLuint program); |
1674 | 1674 |
1675 // Wrapper for glOverlayPromotabilityHintSteramTextureMatrixCHROMIUM | |
piman
2016/12/06 21:40:56
nit: wrong GL name? glOverlayPromotionHintCHROMIUM
liberato (no reviews please)
2016/12/12 16:44:38
Done.
| |
1676 void DoSendOverlayPromotionHintCHROMIUM(GLuint client_id, | |
1677 GLboolean promotion_hint, | |
1678 GLint display_x, | |
1679 GLint display_y); | |
1680 | |
1675 // Wrapper for glReadBuffer | 1681 // Wrapper for glReadBuffer |
1676 void DoReadBuffer(GLenum src); | 1682 void DoReadBuffer(GLenum src); |
1677 | 1683 |
1678 // Wrapper for glRenderbufferStorage. | 1684 // Wrapper for glRenderbufferStorage. |
1679 void DoRenderbufferStorage( | 1685 void DoRenderbufferStorage( |
1680 GLenum target, GLenum internalformat, GLsizei width, GLsizei height); | 1686 GLenum target, GLenum internalformat, GLsizei width, GLsizei height); |
1681 | 1687 |
1682 // Handler for glRenderbufferStorageMultisampleCHROMIUM. | 1688 // Handler for glRenderbufferStorageMultisampleCHROMIUM. |
1683 void DoRenderbufferStorageMultisampleCHROMIUM( | 1689 void DoRenderbufferStorageMultisampleCHROMIUM( |
1684 GLenum target, GLsizei samples, GLenum internalformat, | 1690 GLenum target, GLsizei samples, GLenum internalformat, |
(...skipping 6854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8539 if (workarounds().clear_uniforms_before_first_program_use) | 8545 if (workarounds().clear_uniforms_before_first_program_use) |
8540 program_manager()->ClearUniforms(program); | 8546 program_manager()->ClearUniforms(program); |
8541 } | 8547 } |
8542 } | 8548 } |
8543 | 8549 |
8544 // LinkProgram can be very slow. Exit command processing to allow for | 8550 // LinkProgram can be very slow. Exit command processing to allow for |
8545 // context preemption and GPU watchdog checks. | 8551 // context preemption and GPU watchdog checks. |
8546 ExitCommandProcessingEarly(); | 8552 ExitCommandProcessingEarly(); |
8547 } | 8553 } |
8548 | 8554 |
8555 void GLES2DecoderImpl::DoSendOverlayPromotionHintCHROMIUM( | |
8556 GLuint client_id, | |
8557 GLboolean promotion_hint, | |
8558 GLint display_x, | |
8559 GLint display_y) { | |
8560 if (client_id == 0) | |
8561 return; | |
8562 | |
8563 TextureRef* texture_ref = GetTexture(client_id); | |
8564 if (!texture_ref) { | |
8565 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, | |
8566 "glOverlayPromotionHintStreamTextureMatrix", | |
piman
2016/12/06 21:40:56
nit: fix gl name
liberato (no reviews please)
2016/12/12 16:44:38
Done.
| |
8567 "invalid texture id"); | |
8568 return; | |
8569 } | |
8570 GLStreamTextureImage* image = | |
8571 texture_ref->texture()->GetLevelStreamTextureImage( | |
8572 GL_TEXTURE_EXTERNAL_OES, 0); | |
8573 if (!image) { | |
8574 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, | |
piman
2016/12/06 21:40:56
nit: make this a GL_INVALID_OPERATION, which is mo
liberato (no reviews please)
2016/12/12 16:44:38
Done.
| |
8575 "glOverlayPromotionHintStreamTextureMatrix", | |
piman
2016/12/06 21:40:56
nit: ditto
liberato (no reviews please)
2016/12/12 16:44:38
Done.
| |
8576 "texture has no StreamTextureImage"); | |
8577 return; | |
8578 } | |
8579 | |
8580 image->NotifyPromotionHint(promotion_hint, display_x, display_y); | |
8581 } | |
8582 | |
8549 void GLES2DecoderImpl::DoReadBuffer(GLenum src) { | 8583 void GLES2DecoderImpl::DoReadBuffer(GLenum src) { |
8550 Framebuffer* framebuffer = GetFramebufferInfoForTarget(GL_READ_FRAMEBUFFER); | 8584 Framebuffer* framebuffer = GetFramebufferInfoForTarget(GL_READ_FRAMEBUFFER); |
8551 if (framebuffer) { | 8585 if (framebuffer) { |
8552 if (src == GL_BACK) { | 8586 if (src == GL_BACK) { |
8553 LOCAL_SET_GL_ERROR( | 8587 LOCAL_SET_GL_ERROR( |
8554 GL_INVALID_ENUM, "glReadBuffer", | 8588 GL_INVALID_ENUM, "glReadBuffer", |
8555 "invalid src for a named framebuffer"); | 8589 "invalid src for a named framebuffer"); |
8556 return; | 8590 return; |
8557 } | 8591 } |
8558 framebuffer->set_read_buffer(src); | 8592 framebuffer->set_read_buffer(src); |
(...skipping 10341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
18900 } | 18934 } |
18901 | 18935 |
18902 // Include the auto-generated part of this file. We split this because it means | 18936 // Include the auto-generated part of this file. We split this because it means |
18903 // we can easily edit the non-auto generated parts right here in this file | 18937 // we can easily edit the non-auto generated parts right here in this file |
18904 // instead of having to edit some template or the code generator. | 18938 // instead of having to edit some template or the code generator. |
18905 #include "base/macros.h" | 18939 #include "base/macros.h" |
18906 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 18940 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
18907 | 18941 |
18908 } // namespace gles2 | 18942 } // namespace gles2 |
18909 } // namespace gpu | 18943 } // namespace gpu |
OLD | NEW |