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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 11439026: Revert 171403 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
===================================================================
--- cc/layer_tree_host_impl.cc (revision 171405)
+++ cc/layer_tree_host_impl.cc (working copy)
@@ -279,9 +279,9 @@
return true;
}
-OutputSurface* LayerTreeHostImpl::outputSurface() const
+GraphicsContext* LayerTreeHostImpl::context() const
{
- return m_outputSurface.get();
+ return m_context.get();
}
void LayerTreeHostImpl::animate(base::TimeTicks monotonicTime, base::Time wallClockTime)
@@ -891,9 +891,9 @@
return m_settings;
}
-void LayerTreeHostImpl::didLoseOutputSurface()
+void LayerTreeHostImpl::didLoseContext()
{
- m_client->didLoseOutputSurfaceOnImplThread();
+ m_client->didLoseContextOnImplThread();
}
void LayerTreeHostImpl::onSwapBuffersComplete()
@@ -983,40 +983,40 @@
setBackgroundTickingEnabled(!m_visible && m_needsAnimateLayers);
}
-bool LayerTreeHostImpl::initializeRenderer(scoped_ptr<OutputSurface> outputSurface)
+bool LayerTreeHostImpl::initializeRenderer(scoped_ptr<GraphicsContext> context)
{
// Since we will create a new resource provider, we cannot continue to use
// the old resources (i.e. renderSurfaces and texture IDs). Clear them
// before we destroy the old resource provider.
if (m_rootLayerImpl) {
clearRenderSurfaces();
- sendDidLoseOutputSurfaceRecursive(m_rootLayerImpl.get());
+ sendDidLoseContextRecursive(m_rootLayerImpl.get());
}
// Note: order is important here.
m_renderer.reset();
m_tileManager.reset();
m_resourceProvider.reset();
- m_outputSurface.reset();
+ m_context.reset();
- if (!outputSurface->bindToClient(this))
+ if (!context->bindToClient(this))
return false;
- scoped_ptr<ResourceProvider> resourceProvider = ResourceProvider::create(outputSurface.get());
+ scoped_ptr<ResourceProvider> resourceProvider = ResourceProvider::create(context.get());
if (!resourceProvider)
return false;
if (m_settings.implSidePainting)
m_tileManager.reset(new TileManager(this, resourceProvider.get(), m_settings.numRasterThreads));
- if (outputSurface->context3D())
+ if (context->context3D())
m_renderer = GLRenderer::create(this, resourceProvider.get());
- else if (outputSurface->softwareDevice())
- m_renderer = SoftwareRenderer::create(this, resourceProvider.get(), outputSurface->softwareDevice());
+ else if (context->softwareDevice())
+ m_renderer = SoftwareRenderer::create(this, resourceProvider.get(), context->softwareDevice());
if (!m_renderer)
return false;
m_resourceProvider = resourceProvider.Pass();
- m_outputSurface = outputSurface.Pass();
+ m_context = context.Pass();
if (!m_visible)
m_renderer->setVisible(m_visible);
@@ -1556,16 +1556,16 @@
return base::TimeDelta::FromSeconds(1);
}
-void LayerTreeHostImpl::sendDidLoseOutputSurfaceRecursive(LayerImpl* current)
+void LayerTreeHostImpl::sendDidLoseContextRecursive(LayerImpl* current)
{
DCHECK(current);
- current->didLoseOutputSurface();
+ current->didLoseContext();
if (current->maskLayer())
- sendDidLoseOutputSurfaceRecursive(current->maskLayer());
+ sendDidLoseContextRecursive(current->maskLayer());
if (current->replicaLayer())
- sendDidLoseOutputSurfaceRecursive(current->replicaLayer());
+ sendDidLoseContextRecursive(current->replicaLayer());
for (size_t i = 0; i < current->children().size(); ++i)
- sendDidLoseOutputSurfaceRecursive(current->children()[i]);
+ sendDidLoseContextRecursive(current->children()[i]);
}
static void clearRenderSurfacesOnLayerImplRecursive(LayerImpl* current)
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698