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

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

Issue 2559523002: Send overlay promotion hints from to GLStreamTextureImage. (Closed)
Patch Set: fiddled with GLboolean for windows compiler Created 4 years 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 <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
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 glOverlayPromotionHintCHROMIUIM
1676 void DoOverlayPromotionHintCHROMIUM(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 6858 matching lines...) Expand 10 before | Expand all | Expand 10 after
8543 if (workarounds().clear_uniforms_before_first_program_use) 8549 if (workarounds().clear_uniforms_before_first_program_use)
8544 program_manager()->ClearUniforms(program); 8550 program_manager()->ClearUniforms(program);
8545 } 8551 }
8546 } 8552 }
8547 8553
8548 // LinkProgram can be very slow. Exit command processing to allow for 8554 // LinkProgram can be very slow. Exit command processing to allow for
8549 // context preemption and GPU watchdog checks. 8555 // context preemption and GPU watchdog checks.
8550 ExitCommandProcessingEarly(); 8556 ExitCommandProcessingEarly();
8551 } 8557 }
8552 8558
8559 void GLES2DecoderImpl::DoOverlayPromotionHintCHROMIUM(GLuint client_id,
8560 GLboolean promotion_hint,
8561 GLint display_x,
8562 GLint display_y) {
8563 if (client_id == 0)
8564 return;
8565
8566 TextureRef* texture_ref = GetTexture(client_id);
8567 if (!texture_ref) {
8568 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glOverlayPromotionHintCHROMIUM",
8569 "invalid texture id");
8570 return;
8571 }
8572 GLStreamTextureImage* image =
8573 texture_ref->texture()->GetLevelStreamTextureImage(
8574 GL_TEXTURE_EXTERNAL_OES, 0);
8575 if (!image) {
8576 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glOverlayPromotionHintCHROMIUM",
8577 "texture has no StreamTextureImage");
8578 return;
8579 }
8580
8581 image->NotifyPromotionHint(promotion_hint != GL_FALSE, display_x, display_y);
8582 }
8583
8553 void GLES2DecoderImpl::DoReadBuffer(GLenum src) { 8584 void GLES2DecoderImpl::DoReadBuffer(GLenum src) {
8554 Framebuffer* framebuffer = GetFramebufferInfoForTarget(GL_READ_FRAMEBUFFER); 8585 Framebuffer* framebuffer = GetFramebufferInfoForTarget(GL_READ_FRAMEBUFFER);
8555 if (framebuffer) { 8586 if (framebuffer) {
8556 if (src == GL_BACK) { 8587 if (src == GL_BACK) {
8557 LOCAL_SET_GL_ERROR( 8588 LOCAL_SET_GL_ERROR(
8558 GL_INVALID_ENUM, "glReadBuffer", 8589 GL_INVALID_ENUM, "glReadBuffer",
8559 "invalid src for a named framebuffer"); 8590 "invalid src for a named framebuffer");
8560 return; 8591 return;
8561 } 8592 }
8562 framebuffer->set_read_buffer(src); 8593 framebuffer->set_read_buffer(src);
(...skipping 10371 matching lines...) Expand 10 before | Expand all | Expand 10 after
18934 } 18965 }
18935 18966
18936 // Include the auto-generated part of this file. We split this because it means 18967 // Include the auto-generated part of this file. We split this because it means
18937 // we can easily edit the non-auto generated parts right here in this file 18968 // we can easily edit the non-auto generated parts right here in this file
18938 // instead of having to edit some template or the code generator. 18969 // instead of having to edit some template or the code generator.
18939 #include "base/macros.h" 18970 #include "base/macros.h"
18940 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 18971 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
18941 18972
18942 } // namespace gles2 18973 } // namespace gles2
18943 } // namespace gpu 18974 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gl_stream_texture_image.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698