| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "SampleCode.h" | 8 #include "SampleCode.h" |
| 9 #include "SkView.h" | 9 #include "SkView.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| 11 #include "SkGradientShader.h" | 11 #include "SkGradientShader.h" |
| 12 #include "SkGraphics.h" | 12 #include "SkGraphics.h" |
| 13 #include "SkImageDecoder.h" | 13 #include "SkImageDecoder.h" |
| 14 #include "SkPath.h" | 14 #include "SkPath.h" |
| 15 #include "SkRegion.h" | 15 #include "SkRegion.h" |
| 16 #include "SkShader.h" | 16 #include "SkShader.h" |
| 17 #include "SkUtils.h" | 17 #include "SkUtils.h" |
| 18 #include "SkXfermode.h" | 18 #include "SkXfermode.h" |
| 19 #include "SkColorPriv.h" | 19 #include "SkColorPriv.h" |
| 20 #include "SkColorFilter.h" | 20 #include "SkColorFilter.h" |
| 21 #include "SkTime.h" | 21 #include "SkTime.h" |
| 22 #include "SkTypeface.h" | 22 #include "SkTypeface.h" |
| 23 | 23 |
| 24 #include "SkOSFile.h" | 24 #include "SkOSFile.h" |
| 25 #include "SkStream.h" | 25 #include "SkStream.h" |
| 26 | 26 |
| 27 #if SK_SUPPORT_GPU | |
| 28 #include "SkGpuDevice.h" | |
| 29 #else | |
| 30 class GrContext; | |
| 31 #endif | |
| 32 | |
| 33 #define INT_SIZE 64 | 27 #define INT_SIZE 64 |
| 34 #define SCALAR_SIZE SkIntToScalar(INT_SIZE) | 28 #define SCALAR_SIZE SkIntToScalar(INT_SIZE) |
| 35 | 29 |
| 36 static void make_bitmap(SkBitmap* bitmap) { | 30 static void make_bitmap(SkBitmap* bitmap) { |
| 37 bitmap->allocN32Pixels(INT_SIZE, INT_SIZE); | 31 bitmap->allocN32Pixels(INT_SIZE, INT_SIZE); |
| 38 SkCanvas canvas(*bitmap); | 32 SkCanvas canvas(*bitmap); |
| 39 | 33 |
| 40 canvas.drawColor(SK_ColorRED); | 34 canvas.drawColor(SK_ColorRED); |
| 41 SkPaint paint; | 35 SkPaint paint; |
| 42 paint.setAntiAlias(true); | 36 paint.setAntiAlias(true); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 private: | 230 private: |
| 237 typedef SkView INHERITED; | 231 typedef SkView INHERITED; |
| 238 }; | 232 }; |
| 239 | 233 |
| 240 ////////////////////////////////////////////////////////////////////////////// | 234 ////////////////////////////////////////////////////////////////////////////// |
| 241 | 235 |
| 242 static SkView* F0() { return new BitmapRectView; } | 236 static SkView* F0() { return new BitmapRectView; } |
| 243 static SkView* F1() { return new BitmapRectView2; } | 237 static SkView* F1() { return new BitmapRectView2; } |
| 244 static SkViewRegister gR0(F0); | 238 static SkViewRegister gR0(F0); |
| 245 static SkViewRegister gR1(F1); | 239 static SkViewRegister gR1(F1); |
| OLD | NEW |