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

Unified Diff: cc/trees/thread_proxy.cc

Issue 124063003: [NOT FOR COMMIT] Hacks to get hardware canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: only cc changes left Created 6 years, 11 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 e60a29dc48cfe1f007881c85e917875a19cce1fb..2d3c0f9d1b9b330a1816f8acad0b1a0665ff1414 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -311,6 +311,11 @@ void ThreadProxy::DoCreateAndInitializeOutputSurface() {
OnOutputSurfaceInitializeAttempted(success, capabilities);
}
+void ThreadProxy::SetRendererCapabilitiesMainThreadCopy(
+ const RendererCapabilities& capabilities) {
+ renderer_capabilities_main_thread_copy_ = capabilities;
+}
+
void ThreadProxy::OnOutputSurfaceInitializeAttempted(
bool success,
const RendererCapabilities& capabilities) {
@@ -318,7 +323,7 @@ void ThreadProxy::OnOutputSurfaceInitializeAttempted(
DCHECK(layer_tree_host());
if (success) {
- renderer_capabilities_main_thread_copy_ = capabilities;
+ SetRendererCapabilitiesMainThreadCopy(capabilities);
}
LayerTreeHost::CreateResult result =
@@ -380,10 +385,22 @@ void ThreadProxy::SetNeedsCommit() {
return;
TRACE_EVENT0("cc", "ThreadProxy::SetNeedsCommit");
commit_requested_ = true;
-
SendCommitRequestToImplThreadIfNeeded();
}
+void ThreadProxy::UpdateRendererCapabilitiesOnImplThread() {
+ DCHECK(IsImplThread());
+ // We don't clear PrioritizedResourceManager.
+ DCHECK(layer_tree_host_impl_->settings().impl_side_painting);
+
+ Proxy::MainThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&ThreadProxy::SetRendererCapabilitiesMainThreadCopy,
+ main_thread_weak_ptr_,
+ layer_tree_host_impl_->GetRendererCapabilities()
+ .MainThreadCapabilities()));
+}
+
void ThreadProxy::DidLoseOutputSurfaceOnImplThread() {
DCHECK(IsImplThread());
TRACE_EVENT0("cc", "ThreadProxy::DidLoseOutputSurfaceOnImplThread");
« 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