Commit d65ea042 authored by ccameron's avatar ccameron Committed by Commit bot

Mac: Reset active texture state when drawing CAOpenGLLayer

When GPU raster is enabled, the active texture state is regularly set to
something different at the start of this function. This was observed
empirically.

Of note is that, in principle, all GL state much be reset. When we use
the command buffer to draw inside the CAOpenGLLayer, making the virtual
context current will reset all state for us.

BUG=423163

Review URL: https://codereview.chromium.org/1023673006

Cr-Commit-Position: refs/heads/master@{#321613}
parent d3d37d0f
...@@ -332,6 +332,7 @@ void CALayerStorageProvider::LayerDoDraw() { ...@@ -332,6 +332,7 @@ void CALayerStorageProvider::LayerDoDraw() {
glDisable(GL_STENCIL_TEST); glDisable(GL_STENCIL_TEST);
glDisable(GL_SCISSOR_TEST); glDisable(GL_SCISSOR_TEST);
glColor4f(1, 1, 1, 1); glColor4f(1, 1, 1, 1);
glActiveTexture(GL_TEXTURE0);
glEnable(GL_TEXTURE_RECTANGLE_ARB); glEnable(GL_TEXTURE_RECTANGLE_ARB);
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, fbo_texture_); glBindTexture(GL_TEXTURE_RECTANGLE_ARB, fbo_texture_);
glBegin(GL_QUADS); glBegin(GL_QUADS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment