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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 11649005: cc: Support anti-aliasing for solid color layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: per edge anti-aliasing 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698