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; |