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

Side by Side Diff: sky/engine/core/rendering/RenderBox.cpp

Issue 891573002: Removed a bunch of unneeded paint phase checks. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 Color bgColor = resolveColor(CSSPropertyBackgroundColor); 494 Color bgColor = resolveColor(CSSPropertyBackgroundColor);
495 if (bgColor.alpha() == 255) 495 if (bgColor.alpha() == 255)
496 return true; 496 return true;
497 } 497 }
498 498
499 return false; 499 return false;
500 } 500 }
501 501
502 void RenderBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 502 void RenderBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
503 { 503 {
504 if (paintInfo.phase != PaintPhaseMask)
ojan 2015/01/30 01:25:59 The caller already does this check.
505 return;
506
507 LayoutRect paintRect = LayoutRect(paintOffset, size()); 504 LayoutRect paintRect = LayoutRect(paintOffset, size());
508 paintMaskImages(paintInfo, paintRect); 505 paintMaskImages(paintInfo, paintRect);
509 } 506 }
510 507
511 void RenderBox::paintMaskImages(const PaintInfo& paintInfo, const LayoutRect& pa intRect) 508 void RenderBox::paintMaskImages(const PaintInfo& paintInfo, const LayoutRect& pa intRect)
512 { 509 {
513 paintFillLayers(paintInfo, Color::transparent, style()->maskLayers(), paintR ect, BackgroundBleedNone); 510 paintFillLayers(paintInfo, Color::transparent, style()->maskLayers(), paintR ect, BackgroundBleedNone);
514 paintNinePieceImage(paintInfo.context, paintRect, style(), style()->maskBoxI mage()); 511 paintNinePieceImage(paintInfo.context, paintRect, style(), style()->maskBoxI mage());
515 } 512 }
516 513
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2706 2703
2707 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) 2704 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style)
2708 { 2705 {
2709 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); 2706 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor);
2710 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); 2707 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage();
2711 ASSERT(hasBackground == style.hasBackground()); 2708 ASSERT(hasBackground == style.hasBackground());
2712 hasBorder = style.hasBorder(); 2709 hasBorder = style.hasBorder();
2713 } 2710 }
2714 2711
2715 } // namespace blink 2712 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698