[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

thakis at chromium.org thakis at chromium.org
Wed Dec 22 15:40:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 68a8c4704b31a9db1f4c69cbe6477cea0aa3adde
Author: thakis at chromium.org <thakis at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 10 05:24:54 2010 +0000

    2010-11-09  Nico Weber  <thakis at chromium.org>
    
            Reviewed by Kenneth Russell.
    
            [Chromium] Text jitter during 2D CSS transform
            https://bugs.webkit.org/show_bug.cgi?id=49224
    
            Text subpixel rendering only works in AlphaPremultipliedFirst |
            kCGBitmapByteOrder32Host contexts:
            http://www.cocoabuilder.com/archive/cocoa/228931-sub-pixel-font-smoothing-with-cgbitmapcontext.html
    
            Changing this has the added benefit that the data layout now matches
            skia.
    
            * platform/graphics/chromium/ContentLayerChromium.cpp:
            (WebCore::ContentLayerChromium::SharedValues::SharedValues):
            (WebCore::ContentLayerChromium::updateContents):
            * platform/graphics/chromium/ImageLayerChromium.cpp:
            (WebCore::ImageLayerChromium::updateContents):
            * platform/graphics/chromium/LayerRendererChromium.cpp:
            (WebCore::LayerRendererChromium::setRootLayerCanvasSize):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71717 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 24f362d..49ec38f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-11-09  Nico Weber  <thakis at chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        [Chromium] Text jitter during 2D CSS transform
+        https://bugs.webkit.org/show_bug.cgi?id=49224
+
+        Text subpixel rendering only works in AlphaPremultipliedFirst |
+        kCGBitmapByteOrder32Host contexts:
+        http://www.cocoabuilder.com/archive/cocoa/228931-sub-pixel-font-smoothing-with-cgbitmapcontext.html
+
+        Changing this has the added benefit that the data layout now matches
+        skia.
+
+        * platform/graphics/chromium/ContentLayerChromium.cpp:
+        (WebCore::ContentLayerChromium::SharedValues::SharedValues):
+        (WebCore::ContentLayerChromium::updateContents):
+        * platform/graphics/chromium/ImageLayerChromium.cpp:
+        (WebCore::ImageLayerChromium::updateContents):
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::setRootLayerCanvasSize):
+
 2010-11-09  Helder Correia  <helder at sencha.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp b/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
index eba5349..97f5c3f 100644
--- a/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
@@ -68,9 +68,7 @@ ContentLayerChromium::SharedValues::SharedValues(GraphicsContext3D* context)
         "  v_texCoord = a_texCoord;   \n"
         "}                            \n";
 
-    // Note differences between Skia and Core Graphics versions:
-    //  - Skia uses BGRA
-    //  - Core Graphics uses RGBA
+    // Color is in BGRA order.
     char fragmentShaderString[] =
         "precision mediump float;                            \n"
         "varying vec2 v_texCoord;                            \n"
@@ -79,13 +77,7 @@ ContentLayerChromium::SharedValues::SharedValues(GraphicsContext3D* context)
         "void main()                                         \n"
         "{                                                   \n"
         "  vec4 texColor = texture2D(s_texture, v_texCoord); \n"
-#if PLATFORM(SKIA)
         "  gl_FragColor = vec4(texColor.z, texColor.y, texColor.x, texColor.w) * alpha; \n"
-#elif PLATFORM(CG)
-        "  gl_FragColor = vec4(texColor.x, texColor.y, texColor.z, texColor.w) * alpha; \n"
-#else
-#error "Need to implement for your platform."
-#endif
         "}                                                   \n";
 
     m_contentShaderProgram = createShaderProgram(m_context, vertexShaderString, fragmentShaderString);
@@ -266,7 +258,7 @@ void ContentLayerChromium::updateContents()
     RetainPtr<CGContextRef> contextCG(AdoptCF, CGBitmapContextCreate(tempVector.data(),
                                                                      dirtyRect.width(), dirtyRect.height(), 8, rowBytes,
                                                                      colorSpace.get(),
-                                                                     kCGImageAlphaPremultipliedLast));
+                                                                     kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
     CGContextTranslateCTM(contextCG.get(), 0, dirtyRect.height());
     CGContextScaleCTM(contextCG.get(), 1, -1);
 
diff --git a/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp b/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
index afcc98c..adcbb82 100644
--- a/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
@@ -135,7 +135,7 @@ void ImageLayerChromium::updateContents()
     RetainPtr<CGContextRef> tempContext(AdoptCF, CGBitmapContextCreate(tempVector.data(),
                                                                        width, height, 8, tempRowBytes,
                                                                        colorSpace,
-                                                                       kCGImageAlphaPremultipliedLast));
+                                                                       kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
     CGContextSetBlendMode(tempContext.get(), kCGBlendModeCopy);
     CGContextDrawImage(tempContext.get(),
                        CGRectMake(0, 0, static_cast<CGFloat>(width), static_cast<CGFloat>(height)),
diff --git a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
index e1b525b..3d692a2 100644
--- a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
+++ b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
@@ -138,7 +138,7 @@ void LayerRendererChromium::setRootLayerCanvasSize(const IntSize& size)
     m_rootLayerCGContext.adoptCF(CGBitmapContextCreate(m_rootLayerBackingStore.data(),
                                                        size.width(), size.height(), 8, rowBytes,
                                                        colorSpace.get(),
-                                                       kCGImageAlphaPremultipliedLast));
+                                                       kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
     CGContextTranslateCTM(m_rootLayerCGContext.get(), 0, size.height());
     CGContextScaleCTM(m_rootLayerCGContext.get(), 1, -1);
     m_rootLayerGraphicsContext = new GraphicsContext(m_rootLayerCGContext.get());

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list