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

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: Reveman's comments. 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 c0cf1381adb9ac8e466cb44b723704aec225b767..28f0a49890a553cab56436207021c3d2fbf51608 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -182,6 +182,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),
@@ -2519,7 +2520,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_)
return;
scissor_rect_ = scissor_rect;
@@ -2529,6 +2530,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) {
@@ -3005,6 +3008,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