| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 | 9 |
| 10 #include "Checkerboard.h" | 10 #include "sk_tool_utils.h" |
| 11 #include "Resources.h" | 11 #include "Resources.h" |
| 12 #include "SampleCode.h" | 12 #include "SampleCode.h" |
| 13 #include "SkBlurMask.h" | 13 #include "SkBlurMask.h" |
| 14 #include "SkBlurDrawLooper.h" | 14 #include "SkBlurDrawLooper.h" |
| 15 #include "SkCanvas.h" | 15 #include "SkCanvas.h" |
| 16 #include "SkColorPriv.h" | 16 #include "SkColorPriv.h" |
| 17 #include "SkForceLinking.h" | 17 #include "SkForceLinking.h" |
| 18 #include "SkImageDecoder.h" | 18 #include "SkImageDecoder.h" |
| 19 #include "SkOSFile.h" | 19 #include "SkOSFile.h" |
| 20 #include "SkStream.h" | 20 #include "SkStream.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 return true; | 69 return true; |
| 70 default: | 70 default: |
| 71 break; | 71 break; |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 return this->INHERITED::onQuery(evt); | 75 return this->INHERITED::onQuery(evt); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void onDrawBackground(SkCanvas* canvas) SK_OVERRIDE { | 78 void onDrawBackground(SkCanvas* canvas) SK_OVERRIDE { |
| 79 sk_tools::DrawCheckerboard(canvas, 0xFFCCCCCC, 0xFFFFFFFF, 12); | 79 sk_tool_utils::draw_checkerboard(canvas, 0xFFCCCCCC, 0xFFFFFFFF, 12); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { | 82 void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { |
| 83 SkPaint paint; | 83 SkPaint paint; |
| 84 paint.setAntiAlias(true); | 84 paint.setAntiAlias(true); |
| 85 paint.setTextSize(SkIntToScalar(24)); | 85 paint.setTextSize(SkIntToScalar(24)); |
| 86 SkAutoTUnref<SkBlurDrawLooper> looper( | 86 SkAutoTUnref<SkBlurDrawLooper> looper( |
| 87 SkBlurDrawLooper::Create(SK_ColorBLUE, | 87 SkBlurDrawLooper::Create(SK_ColorBLUE, |
| 88 SkBlurMask::ConvertRadiusToSigma(SkIntToSca
lar(2)), | 88 SkBlurMask::ConvertRadiusToSigma(SkIntToSca
lar(2)), |
| 89 0, 0)); | 89 0, 0)); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 188 |
| 189 typedef SampleView INHERITED; | 189 typedef SampleView INHERITED; |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 ////////////////////////////////////////////////////////////////////////////// | 192 ////////////////////////////////////////////////////////////////////////////// |
| 193 | 193 |
| 194 static SkView* MyFactory() { | 194 static SkView* MyFactory() { |
| 195 return new UnpremulView(GetResourcePath()); | 195 return new UnpremulView(GetResourcePath()); |
| 196 } | 196 } |
| 197 static SkViewRegister reg(MyFactory); | 197 static SkViewRegister reg(MyFactory); |
| OLD | NEW |