Chromium Code Reviews| Index: cc/gl_renderer.cc |
| diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc |
| index 42aaf8f6d9ea87a181eb4d04b174a69126aebfbf..cf9f4f39fdfc3fc84cf33dc4df0ed29bb12004a7 100644 |
| --- a/cc/gl_renderer.cc |
| +++ b/cc/gl_renderer.cc |
| @@ -989,6 +989,16 @@ void GLRenderer::drawStreamVideoQuad(const DrawingFrame& frame, const StreamVide |
| const VideoStreamTextureProgram* program = videoStreamTextureProgram(); |
| setUseProgram(program->program()); |
| + if (quad->texture_id == 0) { |
|
Vangelis Kokkevis
2013/02/21 18:52:54
I'm not too fond of the idea of using texture_id =
danakj
2013/02/21 19:01:51
That sounds like a solid color quad with needs ble
wonsik2
2013/02/26 04:52:24
Created a new quad type; PTAL
wonsik2
2013/02/26 04:52:24
I tried SolidColorDrawQuad with needs_blending ==
wonsik2
2013/02/26 06:47:03
With further investigation, it turned out that an
|
| + // When texture_id == 0, punch a hole instead of rendering. The video |
| + // will be composited outside of Chrome rendering pipeline, and where |
| + // video should be composited should remain transparent in this case. |
| + GLC(m_context, m_context->blendFunc(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA)); |
| + drawQuadGeometry(frame, quad->quadTransform(), quad->rect, program->vertexShader().matrixLocation()); |
| + GLC(m_context, m_context->blendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA)); |
| + return; |
| + } |
| + |
| toGLMatrix(&glMatrix[0], quad->matrix); |
| GLC(context(), context()->uniformMatrix4fv(program->vertexShader().texMatrixLocation(), 1, false, glMatrix)); |