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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 11529003: [cc] Route LayerImpl::layerTreeHostImpl() calls through LayerTreeImpl (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
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_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 "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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 if (it.representsContributingRenderSurface()) { 551 if (it.representsContributingRenderSurface()) {
552 RenderPass::Id contributingRenderPassId = it->renderSurface()->rende rPassId(); 552 RenderPass::Id contributingRenderPassId = it->renderSurface()->rende rPassId();
553 RenderPass* contributingRenderPass = frame.renderPassesById.get(cont ributingRenderPassId); 553 RenderPass* contributingRenderPass = frame.renderPassesById.get(cont ributingRenderPassId);
554 appendQuadsForRenderSurfaceLayer(targetRenderPass, *it, contributing RenderPass, occlusionTracker, appendQuadsData); 554 appendQuadsForRenderSurfaceLayer(targetRenderPass, *it, contributing RenderPass, occlusionTracker, appendQuadsData);
555 } else if (it.representsItself() && !it->visibleContentRect().IsEmpty()) { 555 } else if (it.representsItself() && !it->visibleContentRect().IsEmpty()) {
556 bool hasOcclusionFromOutsideTargetSurface; 556 bool hasOcclusionFromOutsideTargetSurface;
557 bool implDrawTransformIsUnknown = false; 557 bool implDrawTransformIsUnknown = false;
558 if (occlusionTracker.occluded(it->renderTarget(), it->visibleContent Rect(), it->drawTransform(), implDrawTransformIsUnknown, it->drawableContentRect (), &hasOcclusionFromOutsideTargetSurface)) 558 if (occlusionTracker.occluded(it->renderTarget(), it->visibleContent Rect(), it->drawTransform(), implDrawTransformIsUnknown, it->drawableContentRect (), &hasOcclusionFromOutsideTargetSurface))
559 appendQuadsData.hadOcclusionFromOutsideTargetSurface |= hasOcclu sionFromOutsideTargetSurface; 559 appendQuadsData.hadOcclusionFromOutsideTargetSurface |= hasOcclu sionFromOutsideTargetSurface;
560 else { 560 else {
561 DCHECK_EQ(this, it->layerTreeHostImpl()); 561 DCHECK_EQ(this->activeTree(), it->layerTreeImpl());
562 it->willDraw(m_resourceProvider.get()); 562 it->willDraw(m_resourceProvider.get());
563 frame.willDrawLayers.push_back(*it); 563 frame.willDrawLayers.push_back(*it);
564 564
565 if (it->hasContributingDelegatedRenderPasses()) { 565 if (it->hasContributingDelegatedRenderPasses()) {
566 RenderPass::Id contributingRenderPassId = it->firstContribut ingRenderPassId(); 566 RenderPass::Id contributingRenderPassId = it->firstContribut ingRenderPassId();
567 while (frame.renderPassesById.contains(contributingRenderPas sId)) { 567 while (frame.renderPassesById.contains(contributingRenderPas sId)) {
568 RenderPass* renderPass = frame.renderPassesById.get(cont ributingRenderPassId); 568 RenderPass* renderPass = frame.renderPassesById.get(cont ributingRenderPassId);
569 569
570 AppendQuadsData appendQuadsData(renderPass->id); 570 AppendQuadsData appendQuadsData(renderPass->id);
571 appendQuadsForLayer(renderPass, *it, occlusionTracker, a ppendQuadsData); 571 appendQuadsForLayer(renderPass, *it, occlusionTracker, a ppendQuadsData);
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController(); 1720 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController();
1721 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); 1721 double monotonicTime = (time - base::TimeTicks()).InSecondsF();
1722 if (scrollbarController && scrollbarController->animate(monotonicTime)) 1722 if (scrollbarController && scrollbarController->animate(monotonicTime))
1723 m_client->setNeedsRedrawOnImplThread(); 1723 m_client->setNeedsRedrawOnImplThread();
1724 1724
1725 for (size_t i = 0; i < layer->children().size(); ++i) 1725 for (size_t i = 0; i < layer->children().size(); ++i)
1726 animateScrollbarsRecursive(layer->children()[i], time); 1726 animateScrollbarsRecursive(layer->children()[i], time);
1727 } 1727 }
1728 1728
1729 } // namespace cc 1729 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698