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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 11183006: cc: Remove wtf includes from resource provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "CCLayerTreeHostImpl.h" 7 #include "CCLayerTreeHostImpl.h"
8 8
9 #include "CCAppendQuadsData.h" 9 #include "CCAppendQuadsData.h"
10 #include "CCDamageTracker.h" 10 #include "CCDamageTracker.h"
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 { 830 {
831 // Since we will create a new resource provider, we cannot continue to use 831 // Since we will create a new resource provider, we cannot continue to use
832 // the old resources (i.e. renderSurfaces and texture IDs). Clear them 832 // the old resources (i.e. renderSurfaces and texture IDs). Clear them
833 // before we destroy the old resource provider. 833 // before we destroy the old resource provider.
834 if (m_rootLayerImpl) { 834 if (m_rootLayerImpl) {
835 clearRenderSurfaces(); 835 clearRenderSurfaces();
836 sendDidLoseContextRecursive(m_rootLayerImpl.get()); 836 sendDidLoseContextRecursive(m_rootLayerImpl.get());
837 } 837 }
838 // Note: order is important here. 838 // Note: order is important here.
839 m_renderer.reset(); 839 m_renderer.reset();
840 m_resourceProvider.clear(); 840 m_resourceProvider.reset();
841 m_context.reset(); 841 m_context.reset();
842 842
843 if (!context->bindToClient(this)) 843 if (!context->bindToClient(this))
844 return false; 844 return false;
845 845
846 OwnPtr<CCResourceProvider> resourceProvider = CCResourceProvider::create(con text.get()); 846 scoped_ptr<CCResourceProvider> resourceProvider = CCResourceProvider::create (context.get());
847 if (!resourceProvider) 847 if (!resourceProvider)
848 return false; 848 return false;
849 849
850 if (context->context3D()) 850 if (context->context3D())
851 m_renderer = CCRendererGL::create(this, resourceProvider.get()); 851 m_renderer = CCRendererGL::create(this, resourceProvider.get());
852 else if (context->softwareDevice()) 852 else if (context->softwareDevice())
853 m_renderer = CCRendererSoftware::create(this, resourceProvider.get(), co ntext->softwareDevice()); 853 m_renderer = CCRendererSoftware::create(this, resourceProvider.get(), co ntext->softwareDevice());
854 if (!m_renderer) 854 if (!m_renderer)
855 return false; 855 return false;
856 856
857 m_resourceProvider = resourceProvider.release(); 857 m_resourceProvider = resourceProvider.Pass();
858 m_context = context.Pass(); 858 m_context = context.Pass();
859 859
860 if (!m_visible) 860 if (!m_visible)
861 m_renderer->setVisible(m_visible); 861 m_renderer->setVisible(m_visible);
862 862
863 m_client->onCanDrawStateChanged(canDraw()); 863 m_client->onCanDrawStateChanged(canDraw());
864 864
865 return true; 865 return true;
866 } 866 }
867 867
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 1453
1454 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat ionController(); 1454 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat ionController();
1455 if (scrollbarController && scrollbarController->animate(monotonicTime)) 1455 if (scrollbarController && scrollbarController->animate(monotonicTime))
1456 m_client->setNeedsRedrawOnImplThread(); 1456 m_client->setNeedsRedrawOnImplThread();
1457 1457
1458 for (size_t i = 0; i < layer->children().size(); ++i) 1458 for (size_t i = 0; i < layer->children().size(); ++i)
1459 animateScrollbarsRecursive(layer->children()[i], monotonicTime); 1459 animateScrollbarsRecursive(layer->children()[i], monotonicTime);
1460 } 1460 }
1461 1461
1462 } // namespace cc 1462 } // namespace cc
OLDNEW
« 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