| OLD | NEW |
| 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 | 488 |
| 489 AppendQuadsData appendQuadsData; | 489 AppendQuadsData appendQuadsData; |
| 490 gfx::Transform transformToLayerSpace = MathUtil::inverse(rootLayer->screenSp
aceTransform()); | 490 gfx::Transform transformToLayerSpace = MathUtil::inverse(rootLayer->screenSp
aceTransform()); |
| 491 for (Region::Iterator fillRects(fillRegion); fillRects.has_rect(); fillRects
.next()) { | 491 for (Region::Iterator fillRects(fillRegion); fillRects.has_rect(); fillRects
.next()) { |
| 492 // The root layer transform is composed of translations and scales only, | 492 // The root layer transform is composed of translations and scales only, |
| 493 // no perspective, so mapping is sufficient. | 493 // no perspective, so mapping is sufficient. |
| 494 gfx::Rect layerRect = MathUtil::mapClippedRect(transformToLayerSpace, fi
llRects.rect()); | 494 gfx::Rect layerRect = MathUtil::mapClippedRect(transformToLayerSpace, fi
llRects.rect()); |
| 495 // Skip the quad culler and just append the quads directly to avoid | 495 // Skip the quad culler and just append the quads directly to avoid |
| 496 // occlusion checks. | 496 // occlusion checks. |
| 497 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); | 497 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); |
| 498 quad->SetNew(sharedQuadState, layerRect, screenBackgroundColor); | 498 quad->SetNew(sharedQuadState, layerRect, screenBackgroundColor, false, f
alse, false, false); |
| 499 quadCuller.append(quad.PassAs<DrawQuad>(), appendQuadsData); | 499 quadCuller.append(quad.PassAs<DrawQuad>(), appendQuadsData); |
| 500 } | 500 } |
| 501 } | 501 } |
| 502 | 502 |
| 503 bool LayerTreeHostImpl::calculateRenderPasses(FrameData& frame) | 503 bool LayerTreeHostImpl::calculateRenderPasses(FrameData& frame) |
| 504 { | 504 { |
| 505 DCHECK(frame.renderPasses.empty()); | 505 DCHECK(frame.renderPasses.empty()); |
| 506 | 506 |
| 507 updateDrawProperties(); | 507 updateDrawProperties(); |
| 508 if (!canDraw()) | 508 if (!canDraw()) |
| (...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1730 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); | 1730 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); |
| 1731 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); | 1731 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); |
| 1732 if (scrollbarController && scrollbarController->animate(monotonicTime)) | 1732 if (scrollbarController && scrollbarController->animate(monotonicTime)) |
| 1733 m_client->setNeedsRedrawOnImplThread(); | 1733 m_client->setNeedsRedrawOnImplThread(); |
| 1734 | 1734 |
| 1735 for (size_t i = 0; i < layer->children().size(); ++i) | 1735 for (size_t i = 0; i < layer->children().size(); ++i) |
| 1736 animateScrollbarsRecursive(layer->children()[i], time); | 1736 animateScrollbarsRecursive(layer->children()[i], time); |
| 1737 } | 1737 } |
| 1738 | 1738 |
| 1739 } // namespace cc | 1739 } // namespace cc |
| OLD | NEW |