Index: cc/gl_renderer.cc |
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc |
index a40dd3a245b80e384bea0d7cce273d2d441ff6ba..8a4d7061094bdc274a1344e5e1dbd8e2f6cf59d4 100644 |
--- a/cc/gl_renderer.cc |
+++ b/cc/gl_renderer.cc |
@@ -936,6 +936,13 @@ void GLRenderer::drawStreamVideoQuad(const DrawingFrame& frame, const StreamVide |
const VideoStreamTextureProgram* program = videoStreamTextureProgram(); |
setUseProgram(program->program()); |
+ if (quad->texture_id == 0) { |
+ // When texture_id == 0, punch a hole instead of rendering. |
qinmin
2012/12/17 19:34:06
nit: fix indent
enne (OOO)
2012/12/17 20:38:28
What do you mean by punch a hole? Maybe I'm misund
wonsik2
2013/02/14 14:56:38
It seems that 4 spaces are used throughout the fil
wonsik2
2013/02/14 14:56:38
Skipping a quad will make the background occlude t
|
+ 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)); |