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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 11416088: cc: Turn SharedQuadState into a struct-like class similar to DrawQuads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix debug build Created 8 years, 1 month 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_impl.cc ('k') | cc/layer_tree_host_impl_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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 bool layerHasAnimatingTransform = it->screenSpaceTransformIsAnimatin g() || it->drawTransformIsAnimating(); 459 bool layerHasAnimatingTransform = it->screenSpaceTransformIsAnimatin g() || it->drawTransformIsAnimating();
460 if (layerHasAnimatingTransform) 460 if (layerHasAnimatingTransform)
461 drawFrame = false; 461 drawFrame = false;
462 } 462 }
463 463
464 occlusionTracker.leaveLayer(it); 464 occlusionTracker.leaveLayer(it);
465 } 465 }
466 466
467 #ifndef NDEBUG 467 #ifndef NDEBUG
468 for (size_t i = 0; i < frame.renderPasses.size(); ++i) { 468 for (size_t i = 0; i < frame.renderPasses.size(); ++i) {
469 for (size_t j = 0; j < frame.renderPasses[i]->quadList().size(); ++j) { 469 for (size_t j = 0; j < frame.renderPasses[i]->quadList().size(); ++j)
470 DCHECK(frame.renderPasses[i]->quadList()[j]->shared_quad_state); 470 DCHECK(frame.renderPasses[i]->quadList()[j]->shared_quad_state);
471 DCHECK_GE(frame.renderPasses[i]->quadList()[j]->shared_quad_state->i d, 0);
472 }
473 DCHECK(frame.renderPassesById.contains(frame.renderPasses[i]->id())); 471 DCHECK(frame.renderPassesById.contains(frame.renderPasses[i]->id()));
474 } 472 }
475 #endif 473 #endif
476 474
477 if (!m_hasTransparentBackground) { 475 if (!m_hasTransparentBackground) {
478 frame.renderPasses.back()->setHasTransparentBackground(false); 476 frame.renderPasses.back()->setHasTransparentBackground(false);
479 frame.renderPasses.back()->appendQuadsToFillScreen(m_rootLayerImpl.get() , m_backgroundColor, occlusionTracker); 477 frame.renderPasses.back()->appendQuadsToFillScreen(m_rootLayerImpl.get() , m_backgroundColor, occlusionTracker);
480 } 478 }
481 479
482 if (drawFrame) 480 if (drawFrame)
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController(); 1503 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio nController();
1506 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); 1504 double monotonicTime = (time - base::TimeTicks()).InSecondsF();
1507 if (scrollbarController && scrollbarController->animate(monotonicTime)) 1505 if (scrollbarController && scrollbarController->animate(monotonicTime))
1508 m_client->setNeedsRedrawOnImplThread(); 1506 m_client->setNeedsRedrawOnImplThread();
1509 1507
1510 for (size_t i = 0; i < layer->children().size(); ++i) 1508 for (size_t i = 0; i < layer->children().size(); ++i)
1511 animateScrollbarsRecursive(layer->children()[i], time); 1509 animateScrollbarsRecursive(layer->children()[i], time);
1512 } 1510 }
1513 1511
1514 } // namespace cc 1512 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_impl.cc ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698