Title: [190618] trunk
Revision
190618
Author
commit-qu...@webkit.org
Date
2015-10-06 09:35:01 -0700 (Tue, 06 Oct 2015)

Log Message

[Cairo] fast/canvas/canvas-imageSmoothingFoo tests failed after r190383.
https://bugs.webkit.org/show_bug.cgi?id=149752

Patch by Hunseop Jeong <hs85.je...@samsung.com> on 2015-10-06
Reviewed by Carlos Garcia Campos.

CG's low interpolation quality setting is equivalent to most other browsers default or high settings.

Source/WebCore:

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::State::State):

LayoutTests:

* platform/efl/fast/canvas/canvas-imageSmoothingQuality-expected.txt: Added.
* platform/gtk/fast/canvas/canvas-imageSmoothingQuality-expected.txt: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (190617 => 190618)


--- trunk/LayoutTests/ChangeLog	2015-10-06 16:33:21 UTC (rev 190617)
+++ trunk/LayoutTests/ChangeLog	2015-10-06 16:35:01 UTC (rev 190618)
@@ -1,3 +1,15 @@
+2015-10-06  Hunseop Jeong  <hs85.je...@samsung.com>
+
+        [Cairo] fast/canvas/canvas-imageSmoothingFoo tests failed after r190383.
+        https://bugs.webkit.org/show_bug.cgi?id=149752
+
+        Reviewed by Carlos Garcia Campos.
+
+        CG's low interpolation quality setting is equivalent to most other browsers default or high settings.
+
+        * platform/efl/fast/canvas/canvas-imageSmoothingQuality-expected.txt: Added.
+        * platform/gtk/fast/canvas/canvas-imageSmoothingQuality-expected.txt: Added.
+
 2015-10-06  Alex Christensen  <achristen...@webkit.org>
 
         Report error when main resource is blocked by content blocker

Added: trunk/LayoutTests/platform/efl/fast/canvas/canvas-imageSmoothingQuality-expected.txt (0 => 190618)


--- trunk/LayoutTests/platform/efl/fast/canvas/canvas-imageSmoothingQuality-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/efl/fast/canvas/canvas-imageSmoothingQuality-expected.txt	2015-10-06 16:35:01 UTC (rev 190618)
@@ -0,0 +1,40 @@
+Tests for the imageSmoothingQuality attribute.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+PASS lowContext.imageSmoothingQuality is 'low'
+PASS mediumContext.imageSmoothingQuality is 'medium'
+PASS highContext.imageSmoothingQuality is 'high'
+
+PASS lowData is not mediumData
+PASS mediumData is not highData
+PASS lowData is not highData
+
+PASS sampleAlpha(lowData) is >= sampleAlpha(mediumData)
+PASS sampleAlpha(mediumData) is >= sampleAlpha(highData)
+
+FAIL defaultContext.imageSmoothingQuality should be low. Was medium.
+
+PASS highContext.imageSmoothingEnabled = false; highContext.imageSmoothingQuality is 'high'
+PASS highContext.imageSmoothingQuality = 'medium'; highContext.imageSmoothingQuality is 'medium'
+
+highContext.imageSmoothingEnabled = true; highContext.imageSmoothingQuality = 'high';
+PASS scaleImageData(highCanvas, '3223') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, 'bad_input') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, 'LOW') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, 'Medium') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+
+highContext.save(); highContext.imageSmoothingQuality = 'medium';
+PASS highContext.restore(); highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is highData
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+ 

Added: trunk/LayoutTests/platform/gtk/fast/canvas/canvas-imageSmoothingQuality-expected.txt (0 => 190618)


--- trunk/LayoutTests/platform/gtk/fast/canvas/canvas-imageSmoothingQuality-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/fast/canvas/canvas-imageSmoothingQuality-expected.txt	2015-10-06 16:35:01 UTC (rev 190618)
@@ -0,0 +1,40 @@
+Tests for the imageSmoothingQuality attribute.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+PASS lowContext.imageSmoothingQuality is 'low'
+PASS mediumContext.imageSmoothingQuality is 'medium'
+PASS highContext.imageSmoothingQuality is 'high'
+
+PASS lowData is not mediumData
+PASS mediumData is not highData
+PASS lowData is not highData
+
+PASS sampleAlpha(lowData) is >= sampleAlpha(mediumData)
+PASS sampleAlpha(mediumData) is >= sampleAlpha(highData)
+
+FAIL defaultContext.imageSmoothingQuality should be low. Was medium.
+
+PASS highContext.imageSmoothingEnabled = false; highContext.imageSmoothingQuality is 'high'
+PASS highContext.imageSmoothingQuality = 'medium'; highContext.imageSmoothingQuality is 'medium'
+
+highContext.imageSmoothingEnabled = true; highContext.imageSmoothingQuality = 'high';
+PASS scaleImageData(highCanvas, '3223') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, 'bad_input') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, 'LOW') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, 'Medium') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+
+highContext.save(); highContext.imageSmoothingQuality = 'medium';
+PASS highContext.restore(); highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is highData
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+ 

Modified: trunk/Source/WebCore/ChangeLog (190617 => 190618)


--- trunk/Source/WebCore/ChangeLog	2015-10-06 16:33:21 UTC (rev 190617)
+++ trunk/Source/WebCore/ChangeLog	2015-10-06 16:35:01 UTC (rev 190618)
@@ -1,3 +1,15 @@
+2015-10-06  Hunseop Jeong  <hs85.je...@samsung.com>
+
+        [Cairo] fast/canvas/canvas-imageSmoothingFoo tests failed after r190383.
+        https://bugs.webkit.org/show_bug.cgi?id=149752
+
+        Reviewed by Carlos Garcia Campos.
+
+        CG's low interpolation quality setting is equivalent to most other browsers default or high settings.
+
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::CanvasRenderingContext2D::State::State):
+
 2015-10-06  Daniel Bates  <dba...@webkit.org>
 
         Enable XSLT when building WebKit for iOS using the public iOS SDK

Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (190617 => 190618)


--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp	2015-10-06 16:33:21 UTC (rev 190617)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp	2015-10-06 16:35:01 UTC (rev 190618)
@@ -70,6 +70,12 @@
 #include "Settings.h"
 #endif
 
+#if USE(CG)
+#define DefaultSmoothingQuality SmoothingQuality::Low
+#else
+#define DefaultSmoothingQuality SmoothingQuality::Medium
+#endif
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -172,7 +178,7 @@
     , hasInvertibleTransform(true)
     , lineDashOffset(0)
     , imageSmoothingEnabled(true)
-    , imageSmoothingQuality(SmoothingQuality::Low)
+    , imageSmoothingQuality(DefaultSmoothingQuality)
     , textAlign(StartTextAlign)
     , textBaseline(AlphabeticTextBaseline)
     , direction(Direction::Inherit)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to