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

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: Remove ManagedTileState::resource_id. 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
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/picture_layer_impl.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 "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()
787 { 790 {
791 // CheckForCompletedSetPixels() should be called before we draw and
792 // preferably only once per vsync interval. For now just make sure
793 // a redraw is scheduled and call CheckForCompletedSetPixels() in
794 // prepareToDraw().
788 if (m_client) 795 if (m_client)
789 m_client->setNeedsRedrawOnImplThread(); 796 m_client->setNeedsRedrawOnImplThread();
790 } 797 }
791 798
792 void LayerTreeHostImpl::setManagedMemoryPolicy(const ManagedMemoryPolicy& policy ) 799 void LayerTreeHostImpl::setManagedMemoryPolicy(const ManagedMemoryPolicy& policy )
793 { 800 {
794 if (m_managedMemoryPolicy == policy) 801 if (m_managedMemoryPolicy == policy)
795 return; 802 return;
796 803
797 m_managedMemoryPolicy = policy; 804 m_managedMemoryPolicy = policy;
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController(); 1641 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController();
1635 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); 1642 double monotonicTime = (time - base::TimeTicks()).InSecondsF();
1636 if (scrollbarController && scrollbarController->animate(monotonicTime)) 1643 if (scrollbarController && scrollbarController->animate(monotonicTime))
1637 m_client->setNeedsRedrawOnImplThread(); 1644 m_client->setNeedsRedrawOnImplThread();
1638 1645
1639 for (size_t i = 0; i < layer->children().size(); ++i) 1646 for (size_t i = 0; i < layer->children().size(); ++i)
1640 animateScrollbarsRecursive(layer->children()[i], time); 1647 animateScrollbarsRecursive(layer->children()[i], time);
1641 } 1648 }
1642 1649
1643 } // namespace cc 1650 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698