aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/aaclip.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2016-12-21 12:01:12 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-21 17:38:18 +0000
commit463c848f3b63b52e3834e405ff11fd1e653ed271 (patch)
tree7b1b0e7f829f1f3d838f3c42307e6eed2ed3c6d0 /gm/aaclip.cpp
parentbde428513ff3bd98a3d4f1c66ac779411233f817 (diff)
helper to convert CGImage -> SkImage
BUG=skia: Change-Id: I07e0b8fe510d34ab541de7572cb6775478527624 Reviewed-on: https://skia-review.googlesource.com/6386 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'gm/aaclip.cpp')
-rw-r--r--gm/aaclip.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/gm/aaclip.cpp b/gm/aaclip.cpp
index 683f5ff960..e9d4476762 100644
--- a/gm/aaclip.cpp
+++ b/gm/aaclip.cpp
@@ -199,9 +199,10 @@ static void test_image(SkCanvas* canvas, const SkImageInfo& info) {
SkBitmap bm2;
SkCreateBitmapFromCGImage(&bm2, image);
- CGImageRelease(image);
-
canvas->drawBitmap(bm2, 10, 120);
+ canvas->drawImage(SkMakeImageFromCGImage(image), 10, 120 + bm2.height() + 10);
+
+ CGImageRelease(image);
}
class CGImageGM : public skiagm::GM {
@@ -243,10 +244,7 @@ protected:
private:
typedef skiagm::GM INHERITED;
};
-
-#if 0 // Disabled pending fix from reed@
-DEF_GM( return new CGImageGM; )
-#endif
+//DEF_GM( return new CGImageGM; )
#endif
///////////////////////////////////////////////////////////////////////////////////////////////////