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

Unified Diff: gm/imagefiltersbase.cpp

Issue 920513003: Make filters use SkImage instead of SkBitmap Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « no previous file | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefiltersbase.cpp
diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp
index b21f83d6f1a557f76521d0cb445e5798f516bcef..e923a2e02bac3847eefed62e10f77816cdeb5d66 100644
--- a/gm/imagefiltersbase.cpp
+++ b/gm/imagefiltersbase.cpp
@@ -6,14 +6,14 @@
*/
#include "gm.h"
+#include "SkBlurImageFilter.h"
#include "SkCanvas.h"
#include "SkColorFilter.h"
-#include "SkColorPriv.h"
-#include "SkShader.h"
-
-#include "SkBlurImageFilter.h"
#include "SkColorFilterImageFilter.h"
+#include "SkColorPriv.h"
#include "SkDropShadowImageFilter.h"
+#include "SkImage.h"
+#include "SkShader.h"
#include "SkTestImageFilters.h"
class FailImageFilter : public SkImageFilter {
@@ -36,8 +36,8 @@ public:
protected:
FailImageFilter() : INHERITED(0, NULL) {}
- bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
- SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE {
+ bool onFilterImage(Proxy*, const SkImage* src, const Context&,
+ SkAutoTUnref<const SkImage>& result, SkIPoint* offset) const SK_OVERRIDE {
return false;
}
@@ -78,9 +78,9 @@ public:
protected:
IdentityImageFilter(SkImageFilter* input) : INHERITED(1, &input) {}
- bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
- SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE {
- *result = src;
+ bool onFilterImage(Proxy*, const SkImage* src, const Context&,
+ SkAutoTUnref<const SkImage>& result, SkIPoint* offset) const SK_OVERRIDE {
+ result.reset(SkRef(src));
offset->set(0, 0);
return true;
}
« no previous file with comments | « no previous file | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698