aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-07 14:11:40 +0000
committerGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-07 14:11:40 +0000
commit279627efc53e0a1004b296b1254e4c48082a725e (patch)
treedc40a1cef3a755237797601b16967fd379545442
parent0962ae1fbc450dd4672739402bb57fc2bd4fcdc7 (diff)
reverting 9031
git-svn-id: http://skia.googlecode.com/svn/trunk@9033 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/core/SkPictureRecord.cpp6
-rw-r--r--tests/PictureTest.cpp21
2 files changed, 1 insertions, 26 deletions
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index c8386438c5..375bf42662 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -783,11 +783,7 @@ bool SkPictureRecord::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) {
validate(initialOffset, size);
if (fRecordFlags & SkPicture::kUsePathBoundsForClip_RecordingFlag) {
- if (path.isInverseFillType()) {
- return this->getClipDeviceBounds(NULL);
- } else {
- return this->INHERITED::clipRect(path.getBounds(), op, doAA);
- }
+ return this->INHERITED::clipRect(path.getBounds(), op, doAA);
} else {
return this->INHERITED::clipPath(path, op, doAA);
}
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index c92f11cfcf..c702e9426e 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -449,26 +449,6 @@ static void test_clone_empty(skiatest::Reporter* reporter) {
}
}
-static void test_inverse_fill_clip_opt(skiatest::Reporter* reporter) {
- // Regression test for crbug.com/229011
- SkPicture picture;
- SkCanvas* canvas = picture.beginRecording(10, 10,
- SkPicture::kUsePathBoundsForClip_RecordingFlag);
- SkRect rect = SkRect::MakeXYWH(SkIntToScalar(4), SkIntToScalar(4),
- SkIntToScalar(2), SkIntToScalar(2));
- SkPath path;
- path.addRect(rect);
- path.setFillType(SkPath::kInverseEvenOdd_FillType);
- canvas->clipPath(path);
- SkIRect clipBounds;
- bool nonEmpty = canvas->getClipDeviceBounds(&clipBounds);
- REPORTER_ASSERT(reporter, true == nonEmpty);
- REPORTER_ASSERT(reporter, 0 == clipBounds.fLeft);
- REPORTER_ASSERT(reporter, 0 == clipBounds.fTop);
- REPORTER_ASSERT(reporter, 10 == clipBounds.fBottom);
- REPORTER_ASSERT(reporter, 10 == clipBounds.fRight);
-}
-
static void TestPicture(skiatest::Reporter* reporter) {
#ifdef SK_DEBUG
test_deleting_empty_playback();
@@ -480,7 +460,6 @@ static void TestPicture(skiatest::Reporter* reporter) {
test_gatherpixelrefs(reporter);
test_bitmap_with_encoded_data(reporter);
test_clone_empty(reporter);
- test_inverse_fill_clip_opt(reporter);
}
#include "TestClassDef.h"