diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-06 15:10:25 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-06 15:10:25 +0000 |
commit | 1b195bc8fdcc63f9863d44bf3aae5a78800a4668 (patch) | |
tree | 9b028d9f9b63695763c172bd613a4741322fa60d /samplecode/SampleBitmapRect.cpp | |
parent | 3cec4d71e6f53fda99705427f9820d025cfbf64b (diff) |
fix return value for make_bitmap
git-svn-id: http://skia.googlecode.com/svn/trunk@1797 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleBitmapRect.cpp')
-rw-r--r-- | samplecode/SampleBitmapRect.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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 }; |