summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-02 18:34:03 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-02 18:34:03 +0000
commited1298aed61d79956fa6391e2b330d9ac8e385b7 (patch)
treebe126002913208c25a40e094e5eed1b1c512a974
parent8494317cc1f5268457e0a6b0716ee7c6889da936 (diff)
downloadchromium_src-ed1298aed61d79956fa6391e2b330d9ac8e385b7.zip
chromium_src-ed1298aed61d79956fa6391e2b330d9ac8e385b7.tar.gz
chromium_src-ed1298aed61d79956fa6391e2b330d9ac8e385b7.tar.bz2
Fix and uncomment the tests I broke in my transparency patch. Turns out
we should only be making opaque the part of the layer that we actually drew to (since the layer opaquifier doesn't know about clip masks). Review URL: http://codereview.chromium.org/28284 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10709 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--skia/ext/platform_canvas_unittest.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/skia/ext/platform_canvas_unittest.cc b/skia/ext/platform_canvas_unittest.cc
index 1e58102..671c5cf 100644
--- a/skia/ext/platform_canvas_unittest.cc
+++ b/skia/ext/platform_canvas_unittest.cc
@@ -196,7 +196,6 @@ TEST(PlatformCanvas, ClipRegion) {
}
// Test the layers get filled properly by native rendering.
-/* TODO(brettw) fix this test as a result of the transparency patch.
TEST(PlatformCanvas, FillLayer) {
// Create the canvas initialized to opaque white.
PlatformCanvas canvas(16, 16, true);
@@ -228,7 +227,8 @@ TEST(PlatformCanvas, FillLayer) {
canvas.save();
AddClip(canvas, kInnerX, kInnerY, kInnerW, kInnerH);
DrawNativeRect(canvas, 0, 0, 100, 100);
- canvas.getTopPlatformDevice().makeOpaque(0, 0, 100, 100);
+ canvas.getTopPlatformDevice().makeOpaque(
+ kInnerX, kInnerY, kInnerW, kInnerH);
canvas.restore();
}
EXPECT_TRUE(VerifyBlackRect(canvas, kInnerX, kInnerY, kInnerW, kInnerH));
@@ -245,10 +245,8 @@ TEST(PlatformCanvas, FillLayer) {
canvas.restore();
EXPECT_TRUE(VerifyBlackRect(canvas, kInnerX, kInnerY, kInnerW, kInnerH));
}
-*/
// Test that translation + make layer works properly.
-/* TODO(brettw) fix this test as a result of the transparency patch.
TEST(PlatformCanvas, TranslateLayer) {
// Create the canvas initialized to opaque white.
PlatformCanvas canvas(16, 16, true);
@@ -304,12 +302,12 @@ TEST(PlatformCanvas, TranslateLayer) {
canvas.translate(1, 1);
AddClip(canvas, kInnerX, kInnerY, kInnerW, kInnerH);
DrawNativeRect(canvas, 0, 0, 100, 100);
- canvas.getTopPlatformDevice().makeOpaque(0, 0, 100, 100);
+ canvas.getTopPlatformDevice().makeOpaque(kInnerX, kInnerY,
+ kInnerW, kInnerH);
}
canvas.restore();
EXPECT_TRUE(VerifyBlackRect(canvas, kInnerX + 2, kInnerY + 2,
kInnerW, kInnerH));
}
-*/
} // namespace skia