From 1b195bc8fdcc63f9863d44bf3aae5a78800a4668 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Wed, 6 Jul 2011 15:10:25 +0000 Subject: fix return value for make_bitmap git-svn-id: http://skia.googlecode.com/svn/trunk@1797 2bbb7eff-a529-9590-31e7-b0007b416f81 --- samplecode/SampleBitmapRect.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'samplecode/SampleBitmapRect.cpp') diff --git a/samplecode/SampleBitmapRect.cpp b/samplecode/SampleBitmapRect.cpp index 08b8a5acd4..3a93ba7512 100644 --- a/samplecode/SampleBitmapRect.cpp +++ b/samplecode/SampleBitmapRect.cpp @@ -19,7 +19,7 @@ #include "SkGpuDevice.h" -static SkDevice* make_bitmap(SkBitmap* bitmap, GrContext* ctx) { +static void make_bitmap(SkBitmap* bitmap, GrContext* ctx) { SkCanvas canvas; if (ctx) { @@ -59,6 +59,8 @@ protected: } virtual void onDrawContent(SkCanvas* canvas) { + GrContext* ctx = NULL;//SampleCode::GetGr(); + const SkIRect src[] = { { 0, 0, 32, 32 }, { 0, 0, 80, 80 }, @@ -68,10 +70,10 @@ protected: SkPaint paint; paint.setStyle(SkPaint::kStroke_Style); - paint.setColor(SK_ColorGREEN); + paint.setColor(ctx ? SK_ColorGREEN : SK_ColorYELLOW); SkBitmap bitmap; - make_bitmap(&bitmap, NULL /*SampleCode::GetGr()*/); + make_bitmap(&bitmap, ctx); SkRect dstR = { 0, 200, 128, 380 }; -- cgit v1.2.3