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

Unified Diff: cc/trees/single_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/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index dcd4cf679b74500ee3ad7fa901d675f6700de710..4031509a8ffdd7b527c44a5260336e5dcdc2e0e1 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -147,11 +147,7 @@ void SingleThreadProxy::CreateAndInitializeOutputSurface() {
DCHECK(output_surface);
initialized = layer_tree_host_impl_->InitializeRenderer(
output_surface.Pass());
- if (initialized) {
- renderer_capabilities_for_main_thread_ =
- layer_tree_host_impl_->GetRendererCapabilities()
- .MainThreadCapabilities();
- } else if (offscreen_context_provider.get()) {
+ if (!initialized && offscreen_context_provider.get()) {
offscreen_context_provider->VerifyContexts();
offscreen_context_provider = NULL;
}
@@ -370,6 +366,12 @@ void SingleThreadProxy::SendManagedMemoryStats() {
bool SingleThreadProxy::IsInsideDraw() { return inside_draw_; }
+void SingleThreadProxy::UpdateRendererCapabilitiesOnImplThread() {
+ DCHECK(IsImplThread());
+ renderer_capabilities_for_main_thread_ =
+ layer_tree_host_impl_->GetRendererCapabilities().MainThreadCapabilities();
+}
+
void SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() {
TRACE_EVENT0("cc", "SingleThreadProxy::DidLoseOutputSurfaceOnImplThread");
// Cause a commit so we can notice the lost context.
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698