Index: Source/platform/graphics/skia/SkiaUtils.cpp |
diff --git a/Source/platform/graphics/skia/SkiaUtils.cpp b/Source/platform/graphics/skia/SkiaUtils.cpp |
index 0abeb31c85df163d69304e29a81d8b3e93bd60a4..964257aa6afdc1330fba813662a3dc61a5967a81 100644 |
--- a/Source/platform/graphics/skia/SkiaUtils.cpp |
+++ b/Source/platform/graphics/skia/SkiaUtils.cpp |
@@ -330,36 +330,6 @@ InterpolationQuality computeInterpolationQuality( |
return InterpolationLow; |
} |
- |
-bool shouldDrawAntiAliased(const GraphicsContext* context, const SkRect& destRect) |
-{ |
- if (!context->shouldAntialias()) |
- return false; |
- const SkMatrix totalMatrix = context->getTotalMatrix(); |
- // Don't disable anti-aliasing if we're rotated or skewed. |
- if (!totalMatrix.rectStaysRect()) |
- return true; |
- // Disable anti-aliasing for scales or n*90 degree rotations. |
- // Allow to opt out of the optimization though for "hairline" geometry |
- // images - using the shouldAntialiasHairlineImages() GraphicsContext flag. |
- if (!context->shouldAntialiasHairlineImages()) |
- return false; |
- // Check if the dimensions of the destination are "small" (less than one |
- // device pixel). To prevent sudden drop-outs. Since we know that |
- // kRectStaysRect_Mask is set, the matrix either has scale and no skew or |
- // vice versa. We can query the kAffine_Mask flag to determine which case |
- // it is. |
- // FIXME: This queries the CTM while drawing, which is generally |
- // discouraged. Always drawing with AA can negatively impact performance |
- // though - that's why it's not always on. |
- SkScalar widthExpansion, heightExpansion; |
- if (totalMatrix.getType() & SkMatrix::kAffine_Mask) |
- widthExpansion = totalMatrix[SkMatrix::kMSkewY], heightExpansion = totalMatrix[SkMatrix::kMSkewX]; |
- else |
- widthExpansion = totalMatrix[SkMatrix::kMScaleX], heightExpansion = totalMatrix[SkMatrix::kMScaleY]; |
- return destRect.width() * fabs(widthExpansion) < 1 || destRect.height() * fabs(heightExpansion) < 1; |
-} |
- |
int clampedAlphaForBlending(float alpha) |
{ |
if (alpha < 0) |