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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 gfx::Transform transformToLayerSpace(gfx::Transform::kSkipInitialization); | 506 gfx::Transform transformToLayerSpace(gfx::Transform::kSkipInitialization); |
507 bool didInvert = rootLayer->screenSpaceTransform().GetInverse(&transformToLa
yerSpace); | 507 bool didInvert = rootLayer->screenSpaceTransform().GetInverse(&transformToLa
yerSpace); |
508 DCHECK(didInvert); | 508 DCHECK(didInvert); |
509 for (Region::Iterator fillRects(fillRegion); fillRects.has_rect(); fillRects
.next()) { | 509 for (Region::Iterator fillRects(fillRegion); fillRects.has_rect(); fillRects
.next()) { |
510 // The root layer transform is composed of translations and scales only, | 510 // The root layer transform is composed of translations and scales only, |
511 // no perspective, so mapping is sufficient (as opposed to projecting). | 511 // no perspective, so mapping is sufficient (as opposed to projecting). |
512 gfx::Rect layerRect = MathUtil::mapClippedRect(transformToLayerSpace, fi
llRects.rect()); | 512 gfx::Rect layerRect = MathUtil::mapClippedRect(transformToLayerSpace, fi
llRects.rect()); |
513 // Skip the quad culler and just append the quads directly to avoid | 513 // Skip the quad culler and just append the quads directly to avoid |
514 // occlusion checks. | 514 // occlusion checks. |
515 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); | 515 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); |
516 quad->SetNew(sharedQuadState, layerRect, screenBackgroundColor); | 516 quad->SetNew(sharedQuadState, layerRect, DrawQuad::AntiAliasing(), scree
nBackgroundColor); |
517 quadCuller.append(quad.PassAs<DrawQuad>(), appendQuadsData); | 517 quadCuller.append(quad.PassAs<DrawQuad>(), appendQuadsData); |
518 } | 518 } |
519 } | 519 } |
520 | 520 |
521 bool LayerTreeHostImpl::calculateRenderPasses(FrameData& frame) | 521 bool LayerTreeHostImpl::calculateRenderPasses(FrameData& frame) |
522 { | 522 { |
523 DCHECK(frame.renderPasses.isEmpty()); | 523 DCHECK(frame.renderPasses.isEmpty()); |
524 | 524 |
525 if (!canDraw() || !rootLayer()) | 525 if (!canDraw() || !rootLayer()) |
526 return false; | 526 return false; |
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1703 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); | 1703 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); |
1704 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); | 1704 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); |
1705 if (scrollbarController && scrollbarController->animate(monotonicTime)) | 1705 if (scrollbarController && scrollbarController->animate(monotonicTime)) |
1706 m_client->setNeedsRedrawOnImplThread(); | 1706 m_client->setNeedsRedrawOnImplThread(); |
1707 | 1707 |
1708 for (size_t i = 0; i < layer->children().size(); ++i) | 1708 for (size_t i = 0; i < layer->children().size(); ++i) |
1709 animateScrollbarsRecursive(layer->children()[i], time); | 1709 animateScrollbarsRecursive(layer->children()[i], time); |
1710 } | 1710 } |
1711 | 1711 |
1712 } // namespace cc | 1712 } // namespace cc |
OLD | NEW |