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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 12217105: cc: Check for completed raster tasks at interval. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Post task to impl thread when worker pool becomes idle. Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 "cc/layer_tree_host_impl.h" 5 #include "cc/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 { 713 {
714 return m_proxy->hasImplThread(); 714 return m_proxy->hasImplThread();
715 } 715 }
716 716
717 void LayerTreeHostImpl::ScheduleManageTiles() 717 void LayerTreeHostImpl::ScheduleManageTiles()
718 { 718 {
719 if (m_client) 719 if (m_client)
720 m_client->setNeedsManageTilesOnImplThread(); 720 m_client->setNeedsManageTilesOnImplThread();
721 } 721 }
722 722
723 void LayerTreeHostImpl::ScheduleCheckForCompletedRasterTasks()
724 {
725 if (m_client)
726 m_client->setNeedsCheckForCompletedRasterTasksOnImplThread();
727 }
728
723 void LayerTreeHostImpl::DidUploadVisibleHighResolutionTile() 729 void LayerTreeHostImpl::DidUploadVisibleHighResolutionTile()
724 { 730 {
725 if (m_client) 731 if (m_client)
726 m_client->didUploadVisibleHighResolutionTileOnImplThread(); 732 m_client->didUploadVisibleHighResolutionTileOnImplThread();
727 } 733 }
728 734
735 void LayerTreeHostImpl::DidDetectIdleRaster()
736 {
737 if (m_client)
738 m_client->didDetectIdleRasterOnImplThread();
739 }
740
729 bool LayerTreeHostImpl::shouldClearRootRenderPass() const 741 bool LayerTreeHostImpl::shouldClearRootRenderPass() const
730 { 742 {
731 return m_settings.shouldClearRootRenderPass; 743 return m_settings.shouldClearRootRenderPass;
732 } 744 }
733 745
734 void LayerTreeHostImpl::setManagedMemoryPolicy(const ManagedMemoryPolicy& policy ) 746 void LayerTreeHostImpl::setManagedMemoryPolicy(const ManagedMemoryPolicy& policy )
735 { 747 {
736 if (m_managedMemoryPolicy == policy) 748 if (m_managedMemoryPolicy == policy)
737 return; 749 return;
738 750
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 scoped_ptr<base::Value> LayerTreeHostImpl::frameStateAsValue() const 1729 scoped_ptr<base::Value> LayerTreeHostImpl::frameStateAsValue() const
1718 { 1730 {
1719 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1731 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1720 state->SetString("lthi_id", StringPrintf("%p", this)); 1732 state->SetString("lthi_id", StringPrintf("%p", this));
1721 state->Set("device_viewport_size", MathUtil::asValue(m_deviceViewportSize).r elease()); 1733 state->Set("device_viewport_size", MathUtil::asValue(m_deviceViewportSize).r elease());
1722 if (m_tileManager) 1734 if (m_tileManager)
1723 state->Set("tiles", m_tileManager->AllTilesAsValue().release()); 1735 state->Set("tiles", m_tileManager->AllTilesAsValue().release());
1724 return state.PassAs<base::Value>(); 1736 return state.PassAs<base::Value>();
1725 } 1737 }
1726 1738
1739 void LayerTreeHostImpl::checkForCompletedRasterTasks()
1740 {
1741 if (!m_tileManager)
1742 return;
1743
1744 m_tileManager->CheckForCompletedRasterTasks();
1745 }
1746
1727 // static 1747 // static
1728 LayerImpl* LayerTreeHostImpl::getNonCompositedContentLayerRecursive(LayerImpl* l ayer) 1748 LayerImpl* LayerTreeHostImpl::getNonCompositedContentLayerRecursive(LayerImpl* l ayer)
1729 { 1749 {
1730 if (!layer) 1750 if (!layer)
1731 return NULL; 1751 return NULL;
1732 1752
1733 if (layer->drawsContent()) 1753 if (layer->drawsContent())
1734 return layer; 1754 return layer;
1735 1755
1736 for (LayerImpl::LayerList::const_iterator it = layer->children().begin(); 1756 for (LayerImpl::LayerList::const_iterator it = layer->children().begin();
(...skipping 20 matching lines...) Expand all
1757 if (m_tileManager) 1777 if (m_tileManager)
1758 m_tileManager->SetRecordRenderingStats(m_debugState.recordRenderingStats ()); 1778 m_tileManager->SetRecordRenderingStats(m_debugState.recordRenderingStats ());
1759 } 1779 }
1760 1780
1761 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime) 1781 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime)
1762 { 1782 {
1763 m_paintTimeCounter->SavePaintTime(totalPaintTime); 1783 m_paintTimeCounter->SavePaintTime(totalPaintTime);
1764 } 1784 }
1765 1785
1766 } // namespace cc 1786 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | cc/worker_pool.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698