Title: [163357] trunk/Source/WebCore
- Revision
- 163357
- Author
- za...@apple.com
- Date
- 2014-02-03 19:04:22 -0800 (Mon, 03 Feb 2014)
Log Message
Subpixel rendering: Do not query the scaling factor when the graphics context is invalid.
https://bugs.webkit.org/show_bug.cgi?id=128131
Reviewed by Simon Fraser.
No existing context to test it.
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::platformInit):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::platformInit):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (163356 => 163357)
--- trunk/Source/WebCore/ChangeLog 2014-02-04 03:00:24 UTC (rev 163356)
+++ trunk/Source/WebCore/ChangeLog 2014-02-04 03:04:22 UTC (rev 163357)
@@ -1,3 +1,20 @@
+2014-02-03 Zalan Bujtas <za...@apple.com>
+
+ Subpixel rendering: Do not query the scaling factor when the graphics context is invalid.
+ https://bugs.webkit.org/show_bug.cgi?id=128131
+
+ Reviewed by Simon Fraser.
+
+ No existing context to test it.
+
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::platformInit):
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::platformInit):
+ * platform/graphics/wince/GraphicsContextWinCE.cpp:
+ (WebCore::GraphicsContext::platformInit):
+
2014-02-03 Hunseop Jeong <hs85.je...@samsung.com>
[Cairo] GraphicsContext::m_pixelSnappingFactor is uninitialized
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (163356 => 163357)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2014-02-04 03:00:24 UTC (rev 163356)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2014-02-04 03:04:22 UTC (rev 163357)
@@ -536,11 +536,7 @@
static void adjustLineToPixelBoundaries(FloatPoint& p1, FloatPoint& p2, float strokeWidth, StrokeStyle);
private:
-#if !PLATFORM(IOS)
- void platformInit(PlatformGraphicsContext*);
-#else
- void platformInit(PlatformGraphicsContext*, bool shouldUseContextColors);
-#endif
+ void platformInit(PlatformGraphicsContext*, bool shouldUseContextColors = false);
void platformDestroy();
#if PLATFORM(WIN) && !USE(WINGDI)
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (163356 => 163357)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2014-02-04 03:00:24 UTC (rev 163356)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2014-02-04 03:04:22 UTC (rev 163357)
@@ -182,7 +182,7 @@
m_data = new GraphicsContextPlatformPrivateToplevel(new PlatformContextCairo(cr));
}
-void GraphicsContext::platformInit(PlatformContextCairo* platformContext)
+void GraphicsContext::platformInit(PlatformContextCairo* platformContext, bool)
{
m_data = new GraphicsContextPlatformPrivate(platformContext);
if (platformContext)
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (163356 => 163357)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2014-02-04 03:00:24 UTC (rev 163356)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2014-02-04 03:04:22 UTC (rev 163357)
@@ -120,28 +120,24 @@
}
#endif
-#if !PLATFORM(IOS)
-void GraphicsContext::platformInit(CGContextRef cgContext)
-#else
void GraphicsContext::platformInit(CGContextRef cgContext, bool shouldUseContextColors)
-#endif
{
m_data = new GraphicsContextPlatformPrivate(cgContext);
setPaintingDisabled(!cgContext);
-#if !PLATFORM(IOS)
if (cgContext) {
+ CGAffineTransform baseDeviceMatrix = CGContextGetUserSpaceToDeviceSpaceTransform(cgContext);
+ ASSERT(fabs(baseDeviceMatrix.a) == fabs(baseDeviceMatrix.d));
+ m_pixelSnappingFactor = baseDeviceMatrix.a;
+#if PLATFORM(IOS)
+ m_state.shouldUseContextColors = shouldUseContextColors;
+ if (shouldUseContextColors) {
#else
- m_state.shouldUseContextColors = shouldUseContextColors;
- if (cgContext && shouldUseContextColors) {
+ UNUSED_PARAM(shouldUseContextColors);
#endif
// Make sure the context starts in sync with our state.
setPlatformFillColor(fillColor(), fillColorSpace());
setPlatformStrokeColor(strokeColor(), strokeColorSpace());
}
-
- CGAffineTransform baseDeviceMatrix = CGContextGetUserSpaceToDeviceSpaceTransform(cgContext);
- ASSERT(fabs(baseDeviceMatrix.a) == fabs(baseDeviceMatrix.d));
- m_pixelSnappingFactor = baseDeviceMatrix.a;
}
void GraphicsContext::platformDestroy()
Modified: trunk/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp (163356 => 163357)
--- trunk/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp 2014-02-04 03:00:24 UTC (rev 163356)
+++ trunk/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp 2014-02-04 03:04:22 UTC (rev 163357)
@@ -587,7 +587,7 @@
};
-void GraphicsContext::platformInit(PlatformGraphicsContext* dc)
+void GraphicsContext::platformInit(PlatformGraphicsContext* dc, bool)
{
m_data = new GraphicsContextPlatformPrivate(dc);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes