Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: tests/ImageFilterTest.cpp

Issue 768183002: Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/opts/SkXfermode_opts_arm_neon.cpp ('k') | tests/PDFPrimitivesTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 9fd4351b42a65c9cc575183d66b71017fac1200a..6fefe49dcb9f1dcd461f9d7fb546259b3647ac00 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -58,6 +58,13 @@
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(MatrixTestImageFilter)
protected:
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
+ explicit MatrixTestImageFilter(SkReadBuffer& buffer) : SkImageFilter(0, NULL) {
+ fReporter = static_cast<skiatest::Reporter*>(buffer.readFunctionPtr());
+ buffer.readMatrix(&fExpectedMatrix);
+ }
+#endif
+
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE {
this->INHERITED::flatten(buffer);
buffer.writeFunctionPtr(fReporter);
@@ -67,7 +74,7 @@
private:
skiatest::Reporter* fReporter;
SkMatrix fExpectedMatrix;
-
+
typedef SkImageFilter INHERITED;
};
@@ -480,7 +487,7 @@
}
}
-static void draw_saveLayer_picture(int width, int height, int tileSize,
+static void draw_saveLayer_picture(int width, int height, int tileSize,
SkBBHFactory* factory, SkBitmap* result) {
SkMatrix matrix;
@@ -494,8 +501,8 @@
paint.setImageFilter(imageFilter.get());
SkPictureRecorder recorder;
SkRect bounds = SkRect::Make(SkIRect::MakeXYWH(0, 0, 50, 50));
- SkCanvas* recordingCanvas = recorder.beginRecording(SkIntToScalar(width),
- SkIntToScalar(height),
+ SkCanvas* recordingCanvas = recorder.beginRecording(SkIntToScalar(width),
+ SkIntToScalar(height),
factory, 0);
recordingCanvas->translate(-55, 0);
recordingCanvas->saveLayer(&bounds, &paint);
@@ -618,11 +625,11 @@
SkPictureRecorder recorder1, recorder2;
// The only difference between these two pictures is that one has RTree aceleration.
- SkCanvas* recordingCanvas1 = recorder1.beginRecording(SkIntToScalar(width),
- SkIntToScalar(height),
+ SkCanvas* recordingCanvas1 = recorder1.beginRecording(SkIntToScalar(width),
+ SkIntToScalar(height),
NULL, 0);
- SkCanvas* recordingCanvas2 = recorder2.beginRecording(SkIntToScalar(width),
- SkIntToScalar(height),
+ SkCanvas* recordingCanvas2 = recorder2.beginRecording(SkIntToScalar(width),
+ SkIntToScalar(height),
&factory, 0);
draw_blurred_rect(recordingCanvas1);
draw_blurred_rect(recordingCanvas2);
« no previous file with comments | « src/opts/SkXfermode_opts_arm_neon.cpp ('k') | tests/PDFPrimitivesTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698