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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 11618026: Move filters to RenderPassDrawQuad (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 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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 m_fpsCounter->markBeginningOfFrame(base::TimeTicks::Now()); 914 m_fpsCounter->markBeginningOfFrame(base::TimeTicks::Now());
915 915
916 if (m_debugState.showHudRects()) 916 if (m_debugState.showHudRects())
917 m_debugRectHistory->saveDebugRectsForCurrentFrame(rootLayer(), *frame.re nderSurfaceLayerList, frame.occludingScreenSpaceRects, frame.nonOccludingScreenS paceRects, m_debugState); 917 m_debugRectHistory->saveDebugRectsForCurrentFrame(rootLayer(), *frame.re nderSurfaceLayerList, frame.occludingScreenSpaceRects, frame.nonOccludingScreenS paceRects, m_debugState);
918 918
919 // Because the contents of the HUD depend on everything else in the frame, t he contents 919 // Because the contents of the HUD depend on everything else in the frame, t he contents
920 // of its texture are updated as the last thing before the frame is drawn. 920 // of its texture are updated as the last thing before the frame is drawn.
921 if (m_activeTree->hud_layer()) 921 if (m_activeTree->hud_layer())
922 m_activeTree->hud_layer()->updateHudTexture(m_resourceProvider.get()); 922 m_activeTree->hud_layer()->updateHudTexture(m_resourceProvider.get());
923 923
924 m_renderer->drawFrame(frame.renderPasses, frame.renderPassesById); 924 m_renderer->drawFrame(frame.renderPasses);
925
926 // The render passes should be consumed by the renderer. 925 // The render passes should be consumed by the renderer.
927 DCHECK(frame.renderPasses.empty()); 926 DCHECK(frame.renderPasses.empty());
928 DCHECK(frame.renderPassesById.empty()); 927 frame.renderPassesById.clear();
danakj 2012/12/19 21:22:52 I guess this is the immediate followup, but if not
929 928
930 // The next frame should start by assuming nothing has changed, and changes are noted as they occur. 929 // The next frame should start by assuming nothing has changed, and changes are noted as they occur.
931 for (unsigned int i = 0; i < frame.renderSurfaceLayerList->size(); i++) 930 for (unsigned int i = 0; i < frame.renderSurfaceLayerList->size(); i++)
932 (*frame.renderSurfaceLayerList)[i]->renderSurface()->damageTracker()->di dDrawDamagedArea(); 931 (*frame.renderSurfaceLayerList)[i]->renderSurface()->damageTracker()->di dDrawDamagedArea();
933 rootLayer()->resetAllChangeTrackingForSubtree(); 932 rootLayer()->resetAllChangeTrackingForSubtree();
934 } 933 }
935 934
936 void LayerTreeHostImpl::didDrawAllLayers(const FrameData& frame) 935 void LayerTreeHostImpl::didDrawAllLayers(const FrameData& frame)
937 { 936 {
938 for (size_t i = 0; i < frame.willDrawLayers.size(); ++i) 937 for (size_t i = 0; i < frame.willDrawLayers.size(); ++i)
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController(); 1756 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController();
1758 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); 1757 double monotonicTime = (time - base::TimeTicks()).InSecondsF();
1759 if (scrollbarController && scrollbarController->animate(monotonicTime)) 1758 if (scrollbarController && scrollbarController->animate(monotonicTime))
1760 m_client->setNeedsRedrawOnImplThread(); 1759 m_client->setNeedsRedrawOnImplThread();
1761 1760
1762 for (size_t i = 0; i < layer->children().size(); ++i) 1761 for (size_t i = 0; i < layer->children().size(); ++i)
1763 animateScrollbarsRecursive(layer->children()[i], time); 1762 animateScrollbarsRecursive(layer->children()[i], time);
1764 } 1763 }
1765 1764
1766 } // namespace cc 1765 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698