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

Unified Diff: cc/thread_proxy.cc

Issue 11294003: cc: Make --jank-instead-of-checkerboard jank more often (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/thread_proxy.cc
diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc
index 0dc96abb01684271e0b78566bf171424ed880b8c..307a4ec6e03a170d2a87ecbea58aaf3917fa1899 100644
--- a/cc/thread_proxy.cc
+++ b/cc/thread_proxy.cc
@@ -15,6 +15,7 @@
#include "cc/layer_tree_host.h"
#include "cc/scheduler.h"
#include "cc/scoped_thread_proxy.h"
+#include "cc/settings.h"
#include "cc/thread_task.h"
#include <public/WebSharedGraphicsContext3D.h>
#include <wtf/CurrentTime.h>
@@ -704,7 +705,13 @@ ScheduledActionDrawAndSwapResult ThreadProxy::scheduledActionDrawAndSwapInternal
// prepareToDraw(), it is guarded on canDraw() as well.
LayerTreeHostImpl::FrameData frame;
- bool drawFrame = m_layerTreeHostImpl->canDraw() && (m_layerTreeHostImpl->prepareToDraw(frame) || forcedDraw);
+ bool drawFrame = false;
+ if (m_layerTreeHostImpl->canDraw()) {
+ drawFrame = m_layerTreeHostImpl->prepareToDraw(frame);
+
+ if (forcedDraw && !Settings::jankInsteadOfCheckerboard())
danakj 2012/10/24 20:23:39 Is this going to break readbacks or whatever else
enne (OOO) 2012/10/24 20:27:35 Done.
+ drawFrame = true;
+ }
if (drawFrame) {
m_layerTreeHostImpl->drawLayers(frame);
result.didDraw = true;
« 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