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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 11348384: cc: Use asynchronous set pixels API for impl-side painting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and removed unused CheckForPendingSetPixelsCompletion(). 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 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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 DCHECK(it >= 0); 730 DCHECK(it >= 0);
731 } 731 }
732 } 732 }
733 } 733 }
734 734
735 bool LayerTreeHostImpl::prepareToDraw(FrameData& frame) 735 bool LayerTreeHostImpl::prepareToDraw(FrameData& frame)
736 { 736 {
737 TRACE_EVENT0("cc", "LayerTreeHostImpl::prepareToDraw"); 737 TRACE_EVENT0("cc", "LayerTreeHostImpl::prepareToDraw");
738 DCHECK(canDraw()); 738 DCHECK(canDraw());
739 739
740 if (m_tileManager)
741 m_tileManager->CheckForCompletedSetPixels();
742
740 frame.renderSurfaceLayerList = &m_renderSurfaceLayerList; 743 frame.renderSurfaceLayerList = &m_renderSurfaceLayerList;
741 frame.renderPasses.clear(); 744 frame.renderPasses.clear();
742 frame.renderPassesById.clear(); 745 frame.renderPassesById.clear();
743 frame.renderSurfaceLayerList->clear(); 746 frame.renderSurfaceLayerList->clear();
744 frame.willDrawLayers.clear(); 747 frame.willDrawLayers.clear();
745 748
746 if (!calculateRenderPasses(frame)) 749 if (!calculateRenderPasses(frame))
747 return false; 750 return false;
748 751
749 // If we return true, then we expect drawLayers() to be called before this f unction is called again. 752 // If we return true, then we expect drawLayers() to be called before this f unction is called again.
(...skipping 26 matching lines...) Expand all
776 { 779 {
777 return m_proxy->hasImplThread(); 780 return m_proxy->hasImplThread();
778 } 781 }
779 782
780 void LayerTreeHostImpl::ScheduleManageTiles() 783 void LayerTreeHostImpl::ScheduleManageTiles()
781 { 784 {
782 if (m_client) 785 if (m_client)
783 m_client->setNeedsManageTilesOnImplThread(); 786 m_client->setNeedsManageTilesOnImplThread();
784 } 787 }
785 788
786 void LayerTreeHostImpl::ScheduleRedraw() 789 void LayerTreeHostImpl::ScheduleCheckForCompletedSetPixels()
nduca 2012/12/06 16:37:09 Probably worth explaining why this just does a set
reveman 2012/12/06 20:40:35 Done.
787 { 790 {
788 if (m_client) 791 if (m_client)
789 m_client->setNeedsRedrawOnImplThread(); 792 m_client->setNeedsRedrawOnImplThread();
790 } 793 }
791 794
792 void LayerTreeHostImpl::setManagedMemoryPolicy(const ManagedMemoryPolicy& policy ) 795 void LayerTreeHostImpl::setManagedMemoryPolicy(const ManagedMemoryPolicy& policy )
793 { 796 {
794 if (m_managedMemoryPolicy == policy) 797 if (m_managedMemoryPolicy == policy)
795 return; 798 return;
796 799
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController(); 1635 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController();
1633 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); 1636 double monotonicTime = (time - base::TimeTicks()).InSecondsF();
1634 if (scrollbarController && scrollbarController->animate(monotonicTime)) 1637 if (scrollbarController && scrollbarController->animate(monotonicTime))
1635 m_client->setNeedsRedrawOnImplThread(); 1638 m_client->setNeedsRedrawOnImplThread();
1636 1639
1637 for (size_t i = 0; i < layer->children().size(); ++i) 1640 for (size_t i = 0; i < layer->children().size(); ++i)
1638 animateScrollbarsRecursive(layer->children()[i], time); 1641 animateScrollbarsRecursive(layer->children()[i], time);
1639 } 1642 }
1640 1643
1641 } // namespace cc 1644 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698