aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar fmalita@google.com <fmalita@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-07 05:55:39 +0000
committerGravatar fmalita@google.com <fmalita@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-07 05:55:39 +0000
commit7713c38dc0182c8f6a685dace5101c49301de00d (patch)
tree19211a8bbc60885e676709aee79c7322860570b1 /samplecode
parentc5acc6c827993602eded2d5b53fdbe29a372b4c4 (diff)
Revert "Serialization of SkPictureImageFilter"
This reverts commit 227321b30106e57942929eb96fa5bc22544f6c9e. Revert "Sanitizing source files in Housekeeper-Nightly" This reverts commit baf28584b7636c01355f8d8d972e06aa7fb66d77. TBR=robertphillips@google.com,sugoi@google.com Review URL: https://codereview.chromium.org/153583007 git-svn-id: http://skia.googlecode.com/svn/trunk@13356 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleFilterFuzz.cpp35
1 files changed, 1 insertions, 34 deletions
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index 4ef7d4033a..f77f3b814d 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -184,30 +184,6 @@ static const SkBitmap& make_bitmap() {
return bitmap[R(2)];
}
-#ifdef SK_ALLOW_PICTUREIMAGEFILTER_SERIALIZATION
-static void drawSomething(SkCanvas* canvas) {
- SkPaint paint;
-
- canvas->save();
- canvas->scale(0.5f, 0.5f);
- canvas->drawBitmap(make_bitmap(), 0, 0, NULL);
- canvas->restore();
-
- const char beforeStr[] = "before circle";
- const char afterStr[] = "after circle";
-
- paint.setAntiAlias(true);
-
- paint.setColor(SK_ColorRED);
- canvas->drawData(beforeStr, sizeof(beforeStr));
- canvas->drawCircle(SkIntToScalar(kBitmapSize/2), SkIntToScalar(kBitmapSize/2), SkIntToScalar(kBitmapSize/3), paint);
- canvas->drawData(afterStr, sizeof(afterStr));
- paint.setColor(SK_ColorBLACK);
- paint.setTextSize(SkIntToScalar(kBitmapSize/3));
- canvas->drawText("Picture", 7, SkIntToScalar(kBitmapSize/2), SkIntToScalar(kBitmapSize/4), paint);
-}
-#endif
-
static SkImageFilter* make_image_filter(bool canBeNull = true) {
SkImageFilter* filter = 0;
@@ -318,16 +294,7 @@ static SkImageFilter* make_image_filter(bool canBeNull = true) {
filter = new SkTileImageFilter(make_rect(), make_rect(), make_image_filter(false));
break;
case PICTURE:
- {
- SkPicture* pict = NULL;
-#ifdef SK_ALLOW_PICTUREIMAGEFILTER_SERIALIZATION
- pict = new SkPicture;
- SkAutoUnref aur(pict);
- drawSomething(pict->beginRecording(kBitmapSize, kBitmapSize));
- pict->endRecording();
-#endif
- filter = new SkPictureImageFilter(pict, make_rect());
- }
+ filter = new SkPictureImageFilter(NULL, make_rect());
break;
default:
break;