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

Unified Diff: cc/output/gl_renderer.cc

Issue 2273473003: Reset GL state before copying RenderPassDrawQuads to CALayers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index f8d70c4ddb85012371f11a05db47a70bd3375a6f..fb1ee183c2a86feaffa6e4c294cb047b98c25384 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -3864,6 +3864,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
Resource** resource,
DrawingFrame* external_frame,
gfx::RectF* new_bounds) {
+ // Don't carry over any GL state from previous RenderPass draw operations.
+ ReinitializeGLState();
ericrk 2016/08/24 19:04:50 This makes sense - so the state was just left over
erikchen 2016/08/24 20:04:36 Yup. Unfortunately, GLRenderer is very stateful.
+
ScopedResource* contents_texture =
render_pass_textures_[ca_layer_overlay->rpdq->render_pass_id].get();
DCHECK(contents_texture);
@@ -3967,11 +3970,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
// Clear to 0 to ensure the background is transparent.
gl_->ClearColor(0, 0, 0, 0);
- if (is_scissor_enabled_)
- gl_->Disable(GL_SCISSOR_TEST);
gl_->Clear(GL_COLOR_BUFFER_BIT);
- if (is_scissor_enabled_)
- gl_->Enable(GL_SCISSOR_TEST);
UpdateRPDQTexturesForSampling(&params);
UpdateRPDQBlendMode(&params);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698