Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
index efef0da9684a7218e21c3c4fb35817c7cc2e2dce..410daa8bef1173411e26fa4251aee49144f1d7f3 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -1672,6 +1672,12 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient { |
// Wrapper for glLinkProgram |
void DoLinkProgram(GLuint program); |
+ // Wrapper for glOverlayPromotionHintCHROMIUIM |
+ void DoOverlayPromotionHintCHROMIUM(GLuint client_id, |
+ GLboolean promotion_hint, |
+ GLint display_x, |
+ GLint display_y); |
+ |
// Wrapper for glReadBuffer |
void DoReadBuffer(GLenum src); |
@@ -8550,6 +8556,31 @@ void GLES2DecoderImpl::DoLinkProgram(GLuint program_id) { |
ExitCommandProcessingEarly(); |
} |
+void GLES2DecoderImpl::DoOverlayPromotionHintCHROMIUM(GLuint client_id, |
+ GLboolean promotion_hint, |
+ GLint display_x, |
+ GLint display_y) { |
+ if (client_id == 0) |
+ return; |
+ |
+ TextureRef* texture_ref = GetTexture(client_id); |
+ if (!texture_ref) { |
+ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glOverlayPromotionHintCHROMIUM", |
+ "invalid texture id"); |
+ return; |
+ } |
+ GLStreamTextureImage* image = |
+ texture_ref->texture()->GetLevelStreamTextureImage( |
+ GL_TEXTURE_EXTERNAL_OES, 0); |
+ if (!image) { |
+ LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glOverlayPromotionHintCHROMIUM", |
+ "texture has no StreamTextureImage"); |
+ return; |
+ } |
+ |
+ image->NotifyPromotionHint(promotion_hint != GL_FALSE, display_x, display_y); |
+} |
+ |
void GLES2DecoderImpl::DoReadBuffer(GLenum src) { |
Framebuffer* framebuffer = GetFramebufferInfoForTarget(GL_READ_FRAMEBUFFER); |
if (framebuffer) { |