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

Side by Side Diff: Source/core/paint/BoxPainter.cpp

Issue 1195933002: SP: Always anti-alias borders in slimming paint mode. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/paint/InlinePainter.cpp » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "core/paint/BoxPainter.h" 6 #include "core/paint/BoxPainter.h"
7 7
8 #include "core/HTMLNames.h" 8 #include "core/HTMLNames.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/html/HTMLFrameOwnerElement.h" 10 #include "core/html/HTMLFrameOwnerElement.h"
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 } 866 }
867 867
868 bool BoxPainter::paintNinePieceImage(LayoutBoxModelObject& obj, GraphicsContext* graphicsContext, const LayoutRect& rect, const ComputedStyle& style, const Nine PieceImage& ninePieceImage, SkXfermode::Mode op) 868 bool BoxPainter::paintNinePieceImage(LayoutBoxModelObject& obj, GraphicsContext* graphicsContext, const LayoutRect& rect, const ComputedStyle& style, const Nine PieceImage& ninePieceImage, SkXfermode::Mode op)
869 { 869 {
870 NinePieceImagePainter ninePieceImagePainter(obj); 870 NinePieceImagePainter ninePieceImagePainter(obj);
871 return ninePieceImagePainter.paint(graphicsContext, rect, style, ninePieceIm age, op); 871 return ninePieceImagePainter.paint(graphicsContext, rect, style, ninePieceIm age, op);
872 } 872 }
873 873
874 bool BoxPainter::shouldAntialiasLines(GraphicsContext* context) 874 bool BoxPainter::shouldAntialiasLines(GraphicsContext* context)
875 { 875 {
876 if (RuntimeEnabledFeatures::slimmingPaintEnabled())
877 return true;
876 // FIXME: We may want to not antialias when scaled by an integral value, 878 // FIXME: We may want to not antialias when scaled by an integral value,
877 // and we may want to antialias when translated by a non-integral value. 879 // and we may want to antialias when translated by a non-integral value.
878 // FIXME: See crbug.com/382491. getCTM does not include scale factors applie d at raster time, such 880 // FIXME: See crbug.com/382491. getCTM does not include scale factors applie d at raster time, such
879 // as device zoom. 881 // as device zoom.
880 return !context->getCTM().isIdentityOrTranslationOrFlipped(); 882 return !context->getCTM().isIdentityOrTranslationOrFlipped();
881 } 883 }
882 884
883 bool BoxPainter::allCornersClippedOut(const FloatRoundedRect& border, const IntR ect& intClipRect) 885 bool BoxPainter::allCornersClippedOut(const FloatRoundedRect& border, const IntR ect& intClipRect)
884 { 886 {
885 LayoutRect boundingRect(border.rect()); 887 LayoutRect boundingRect(border.rect());
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 else 1044 else
1043 clippedEdges |= GraphicsContext::BottomEdge; 1045 clippedEdges |= GraphicsContext::BottomEdge;
1044 } 1046 }
1045 // TODO: support non-integer shadows - crbug.com/334828 1047 // TODO: support non-integer shadows - crbug.com/334828
1046 context->drawInnerShadow(border, shadowColor, flooredIntSize(shadowO ffset), shadowBlur, shadowSpread, clippedEdges); 1048 context->drawInnerShadow(border, shadowColor, flooredIntSize(shadowO ffset), shadowBlur, shadowSpread, clippedEdges);
1047 } 1049 }
1048 } 1050 }
1049 } 1051 }
1050 1052
1051 } // namespace blink 1053 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/paint/InlinePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698