diff options
author | japhet@chromium.org <japhet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 21:31:30 +0000 |
---|---|---|
committer | japhet@chromium.org <japhet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 21:31:30 +0000 |
commit | 8f5f7f38c7f9bcad93e17fa5b99138d8eeadcc65 (patch) | |
tree | 5e21a659252aa3ee990b992c64647f199946e788 /webkit/tools/webcore_unit_tests | |
parent | 5e85b6df11e8a98a7384a9b2a84471e3de85011f (diff) | |
download | chromium_src-8f5f7f38c7f9bcad93e17fa5b99138d8eeadcc65.zip chromium_src-8f5f7f38c7f9bcad93e17fa5b99138d8eeadcc65.tar.gz chromium_src-8f5f7f38c7f9bcad93e17fa5b99138d8eeadcc65.tar.bz2 |
WebKit roll 50756:50820.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/391019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31715 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/webcore_unit_tests')
-rw-r--r-- | webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp b/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp index 868d410..18535e6 100644 --- a/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp +++ b/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp @@ -315,10 +315,10 @@ TEST(TransparencyWin, OpaqueCompositeLayerPixel) OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); FloatRect fullRect(0, 0, 16, 16); - src->context()->fillRect(fullRect, red); + src->context()->fillRect(fullRect, red, DeviceColorSpace); src->context()->beginTransparencyLayer(0.5); FloatRect rightHalf(8, 0, 8, 16); - src->context()->fillRect(rightHalf, green); + src->context()->fillRect(rightHalf, green, DeviceColorSpace); // Make a transparency layer inset by one pixel, and fill it inset by // another pixel with 50% black. @@ -330,7 +330,7 @@ TEST(TransparencyWin, OpaqueCompositeLayerPixel) IntRect(1, 1, 14, 14)); FloatRect inner(2, 2, 12, 12); - helper.context()->fillRect(inner, Color(0x7f000000)); + helper.context()->fillRect(inner, Color(0x7f000000), DeviceColorSpace); // These coordinates are relative to the layer, whish is inset by 1x1 // pixels from the top left. So we're actually clearing (2, 2) and // (13,13), which are the extreme corners of the black area (and which @@ -368,7 +368,7 @@ TEST(TransparencyWin, TranslateOpaqueCompositeLayer) OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); Color white(0xFFFFFFFF); FloatRect fullRect(0, 0, 16, 16); - src->context()->fillRect(fullRect, white); + src->context()->fillRect(fullRect, white, DeviceColorSpace); // Scroll down by 8 (coordinate system goes up). src->context()->save(); @@ -388,7 +388,7 @@ TEST(TransparencyWin, TranslateOpaqueCompositeLayer) // Draw a red pixel at (15, 15). This should be the at (15, 7) after // the transform. FloatRect bottomRight(15, 15, 1, 1); - helper.context()->fillRect(bottomRight, green); + helper.context()->fillRect(bottomRight, green, DeviceColorSpace); helper.composite(); } @@ -407,7 +407,7 @@ TEST(TransparencyWin, RotateOpaqueCompositeLayer) // The background is white. Color white(0xFFFFFFFF); FloatRect fullRect(0, 0, 16, 16); - src->context()->fillRect(fullRect, white); + src->context()->fillRect(fullRect, white, DeviceColorSpace); // Rotate the image by 90 degrees. This matrix is the same as // cw90.rotate(90); but avoids rounding errors. Rounding errors can cause @@ -428,7 +428,7 @@ TEST(TransparencyWin, RotateOpaqueCompositeLayer) src->context()->beginTransparencyLayer(0.5); FloatRect blackRect(0, -9, 16, 2); Color black(0xFF000000); - src->context()->fillRect(blackRect, black); + src->context()->fillRect(blackRect, black, DeviceColorSpace); // Now draw 50% red square. { @@ -442,7 +442,7 @@ TEST(TransparencyWin, RotateOpaqueCompositeLayer) IntRect(1, -15, 14, 14)); // Fill with red. - helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000)); + helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000), DeviceColorSpace); clearTopLayerAlphaChannel(helper.context()); helper.composite(); } @@ -489,10 +489,10 @@ TEST(TransparencyWin, TranslateScaleOpaqueCompositeLayer) // The background is white on top with red on bottom. Color white(0xFFFFFFFF); FloatRect topRect(0, 0, 16, 8); - src->context()->fillRect(topRect, white); + src->context()->fillRect(topRect, white, DeviceColorSpace); Color red(0xFFFF0000); FloatRect bottomRect(0, 8, 16, 8); - src->context()->fillRect(bottomRect, red); + src->context()->fillRect(bottomRect, red, DeviceColorSpace); src->context()->save(); @@ -522,7 +522,7 @@ TEST(TransparencyWin, TranslateScaleOpaqueCompositeLayer) IntRect(1, -15, 14, 14)); // Fill with red. - helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000)); + helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000), DeviceColorSpace); clearTopLayerAlphaChannel(helper.context()); helper.composite(); } @@ -534,7 +534,7 @@ TEST(TransparencyWin, Scale) // Create an opaque white buffer. OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); FloatRect fullBuffer(0, 0, 16, 16); - src->context()->fillRect(fullBuffer, Color::white); + src->context()->fillRect(fullBuffer, Color::white, DeviceColorSpace); // Scale by 2x. src->context()->save(); @@ -589,13 +589,13 @@ TEST(TransparencyWin, ScaleTransparency) // Create an opaque white buffer. OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); FloatRect fullBuffer(0, 0, 16, 16); - src->context()->fillRect(fullBuffer, Color::white); + src->context()->fillRect(fullBuffer, Color::white, DeviceColorSpace); // Make another layer (which duplicates how WebKit will make this). We fill // the top half with red, and have the layer be 50% opaque. src->context()->beginTransparencyLayer(0.5); FloatRect topHalf(0, 0, 16, 8); - src->context()->fillRect(topHalf, Color(0xFFFF0000)); + src->context()->fillRect(topHalf, Color(0xFFFF0000), DeviceColorSpace); // Scale by 2x. src->context()->save(); @@ -612,7 +612,7 @@ TEST(TransparencyWin, ScaleTransparency) TransparencyWin::ScaleTransform, IntRect(1, 1, 6, 6)); - helper.context()->fillRect(helper.drawRect(), Color(0x7f000000)); + helper.context()->fillRect(helper.drawRect(), Color(0x7f000000), DeviceColorSpace); clearTopLayerAlphaChannel(helper.context()); helper.composite(); } @@ -661,21 +661,21 @@ TEST(TransparencyWin, Text) // Write several different squares to simulate ClearType. These should // all reduce to 2/3 coverage. FloatRect pixel(0, 0, 1, 1); - helper.context()->fillRect(pixel, 0xFFFF0000); + helper.context()->fillRect(pixel, 0xFFFF0000, DeviceColorSpace); pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF00FF00); + helper.context()->fillRect(pixel, 0xFF00FF00, DeviceColorSpace); pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF0000FF); + helper.context()->fillRect(pixel, 0xFF0000FF, DeviceColorSpace); pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF008080); + helper.context()->fillRect(pixel, 0xFF008080, DeviceColorSpace); pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF800080); + helper.context()->fillRect(pixel, 0xFF800080, DeviceColorSpace); pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF808000); + helper.context()->fillRect(pixel, 0xFF808000, DeviceColorSpace); // Try one with 100% coverage (opaque black). pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF000000); + helper.context()->fillRect(pixel, 0xFF000000, DeviceColorSpace); // Now mess with the alpha channel. clearTopLayerAlphaChannel(helper.context()); |