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

Unified 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 side-by-side diff with in-line comments
Download patch
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) {
« 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