Index: Source/platform/graphics/GraphicsContext.h |
diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h |
index add6d3c26e59a1e6324dce9fc15eb4094038e3fd..8e275abf629d37a0e5b73a6427e0607528f9345b 100644 |
--- a/Source/platform/graphics/GraphicsContext.h |
+++ b/Source/platform/graphics/GraphicsContext.h |
@@ -136,6 +136,13 @@ public: |
void setShouldAntialias(bool antialias) { mutableState()->setShouldAntialias(antialias); } |
bool shouldAntialias() const { return immutableState()->shouldAntialias(); } |
+ // Disable the anti-aliasing optimization for scales/multiple-of-90-degrees |
+ // rotations of thin ("hairline") images. |
+ // Note: This will only be reliable when the device pixel scale/ratio is |
+ // fixed (e.g. when drawing to context backed by an ImageBuffer). |
+ void disableAntialiasingOptimizationForHairlineImages() { ASSERT(!isRecording()); m_antialiasHairlineImages = true; } |
+ bool shouldAntialiasHairlineImages() const { return m_antialiasHairlineImages; } |
+ |
void setShouldClampToSourceRect(bool clampToSourceRect) { mutableState()->setShouldClampToSourceRect(clampToSourceRect); } |
bool shouldClampToSourceRect() const { return immutableState()->shouldClampToSourceRect(); } |
@@ -504,6 +511,7 @@ private: |
bool m_accelerated : 1; |
bool m_isCertainlyOpaque : 1; |
bool m_printing : 1; |
+ bool m_antialiasHairlineImages : 1; |
}; |
} // namespace WebCore |