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

Unified Diff: cc/trees/thread_proxy.cc

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 10 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 | « cc/trees/thread_proxy.h ('k') | gpu/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 167cca9792f8b3036a9ee70803b2fe077dcda3d4..1097805855691baae4dfb1fb7d4ca2c58ae473dc 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -154,9 +154,9 @@ bool ThreadProxy::IsStarted() const {
}
bool ThreadProxy::CommitToActiveTree() const {
- // With ThreadProxy we use a pending tree and activate it once it's ready to
- // draw.
- return false;
+ // With ThreadProxy and impl-side painting, we use a pending tree and activate
+ // it once it's ready to draw.
+ return !impl().layer_tree_host_impl->settings().impl_side_painting;
}
void ThreadProxy::SetLayerTreeHostClientReady() {
@@ -701,6 +701,12 @@ void ThreadProxy::ScheduledActionSendBeginMainFrame() {
impl().timing_history.DidBeginMainFrame();
}
+void ThreadProxy::SendBeginMainFrameNotExpectedSoon() {
+ Proxy::MainThreadTaskRunner()->PostTask(
+ FROM_HERE, base::Bind(&ThreadProxy::BeginMainFrameNotExpectedSoon,
+ main_thread_weak_ptr_));
+}
+
void ThreadProxy::BeginMainFrame(
scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) {
benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task(
@@ -861,6 +867,12 @@ void ThreadProxy::BeginMainFrame(
layer_tree_host()->DidBeginMainFrame();
}
+void ThreadProxy::BeginMainFrameNotExpectedSoon() {
+ TRACE_EVENT0("cc", "ThreadProxy::BeginMainFrameNotExpectedSoon");
+ DCHECK(IsMainThread());
+ layer_tree_host()->BeginMainFrameNotExpectedSoon();
+}
+
void ThreadProxy::StartCommitOnImplThread(CompletionEvent* completion,
ResourceUpdateQueue* raw_queue) {
TRACE_EVENT0("cc", "ThreadProxy::StartCommitOnImplThread");
@@ -1021,8 +1033,11 @@ DrawResult ThreadProxy::DrawSwapInternal(bool forced_draw) {
impl().timing_history.DidStartDrawing();
base::AutoReset<bool> mark_inside(&impl().inside_draw, true);
- if (impl().layer_tree_host_impl->pending_tree())
- impl().layer_tree_host_impl->pending_tree()->UpdateDrawProperties();
+ if (impl().layer_tree_host_impl->pending_tree()) {
+ bool update_lcd_text = false;
+ impl().layer_tree_host_impl->pending_tree()->UpdateDrawProperties(
+ update_lcd_text);
+ }
// This method is called on a forced draw, regardless of whether we are able
// to produce a frame, as the calling site on main thread is blocked until its
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | gpu/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698