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

Unified Diff: cc/output/gl_renderer.cc

Issue 69343005: Added preliminary support for tile rasterization with Ganesh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 10014f8b89d9ab4d1fb9805210e8ac5176652a2a..f34eb18f6644fed9f988c7139294e1588d856805 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -168,6 +168,7 @@ GLRenderer::GLRenderer(RendererClient* client,
is_backbuffer_discarded_(false),
visible_(true),
is_scissor_enabled_(false),
+ scissor_rect_needs_reset_(true),
stencil_shadow_(false),
blend_shadow_(false),
highp_threshold_min_(highp_threshold_min),
@@ -2486,7 +2487,7 @@ void GLRenderer::SetScissorTestRect(gfx::Rect scissor_rect) {
// Don't unnecessarily ask the context to change the scissor, because it
// may cause undesired GPU pipeline flushes.
- if (scissor_rect == scissor_rect_)
+ if (scissor_rect == scissor_rect_ && !scissor_rect_needs_reset_)
reveman 2013/11/24 21:56:57 can you explain why we need this now but not befor
slavi 2013/11/25 23:13:14 Ganesh and the GlRendeder are sharing the GL state
enne (OOO) 2013/11/25 23:14:10 Yeah, this looks like it should be a separate patc
slavi 2013/11/25 23:22:52 Ok. I'll prepare it as a separate patch.
return;
scissor_rect_ = scissor_rect;
@@ -2496,6 +2497,8 @@ void GLRenderer::SetScissorTestRect(gfx::Rect scissor_rect) {
scissor_rect.y(),
scissor_rect.width(),
scissor_rect.height()));
+
+ scissor_rect_needs_reset_ = false;
}
void GLRenderer::SetDrawViewport(gfx::Rect window_space_viewport) {
@@ -2946,6 +2949,7 @@ void GLRenderer::ReinitializeGLState() {
// Make sure scissoring starts as disabled.
is_scissor_enabled_ = false;
GLC(context_, context_->disable(GL_SCISSOR_TEST));
+ scissor_rect_needs_reset_ = true;
}
bool GLRenderer::CanUseSkiaGPUBackend() const {

Powered by Google App Engine
This is Rietveld 408576698