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

Unified Diff: cc/trees/thread_proxy.cc

Issue 151093005: cc: Update Main RendererCapabilities on DeferredInitialize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add back a DCHECK that was accdentially deleted Created 6 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') | no next file » | 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 cdf05c01db9d9506caf135323b967cf6855be1f7..98e5d61f20e20dc236b1a20d882ccf498937ade2 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -338,6 +338,11 @@ void ThreadProxy::DoCreateAndInitializeOutputSurface() {
OnOutputSurfaceInitializeAttempted(success, capabilities);
}
+void ThreadProxy::SetRendererCapabilitiesMainThreadCopy(
+ const RendererCapabilities& capabilities) {
+ main().renderer_capabilities_main_thread_copy = capabilities;
+}
+
void ThreadProxy::OnOutputSurfaceInitializeAttempted(
bool success,
const RendererCapabilities& capabilities) {
@@ -411,6 +416,17 @@ void ThreadProxy::SetNeedsCommit() {
SendCommitRequestToImplThreadIfNeeded();
}
+void ThreadProxy::UpdateRendererCapabilitiesOnImplThread() {
+ DCHECK(IsImplThread());
+ Proxy::MainThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&ThreadProxy::SetRendererCapabilitiesMainThreadCopy,
+ main_thread_weak_ptr_,
+ impl()
+ .layer_tree_host_impl->GetRendererCapabilities()
+ .MainThreadCapabilities()));
+}
+
void ThreadProxy::DidLoseOutputSurfaceOnImplThread() {
TRACE_EVENT0("cc", "ThreadProxy::DidLoseOutputSurfaceOnImplThread");
DCHECK(IsImplThread());
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698