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

Unified Diff: gm/imageresizetiled.cpp

Issue 211103006: Implement a generic matrix transform image filter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rename the GM too Created 6 years, 9 months 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 | « gm/imagefiltersscaled.cpp ('k') | gm/matriximagefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imageresizetiled.cpp
diff --git a/gm/imageresizetiled.cpp b/gm/imageresizetiled.cpp
index eba87c5f1f61424309a77e04f2a7d8081fb11073..0e6bd6d6bc339c0f81a55ce13fba199d7f92a883 100644
--- a/gm/imageresizetiled.cpp
+++ b/gm/imageresizetiled.cpp
@@ -6,7 +6,7 @@
*/
#include "gm.h"
-#include "SkResizeImageFilter.h"
+#include "SkMatrixImageFilter.h"
#include "SkRandom.h"
#define WIDTH 640
@@ -36,8 +36,10 @@ protected:
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
SkPaint paint;
+ SkMatrix matrix;
+ matrix.setScale(RESIZE_FACTOR, RESIZE_FACTOR);
SkAutoTUnref<SkImageFilter> imageFilter(
- SkResizeImageFilter::Create(RESIZE_FACTOR, RESIZE_FACTOR, SkPaint::kNone_FilterLevel));
+ SkMatrixImageFilter::Create(matrix, SkPaint::kNone_FilterLevel));
paint.setImageFilter(imageFilter.get());
const SkScalar tile_size = SkIntToScalar(100);
SkRect bounds;
« no previous file with comments | « gm/imagefiltersscaled.cpp ('k') | gm/matriximagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698