| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 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 "Resources.h" | 9 #include "Resources.h" |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 SkPaint paint; | 82 SkPaint paint; |
| 83 paint.setShader(fShader); | 83 paint.setShader(fShader); |
| 84 paint.setColor(SK_ColorBLACK); | 84 paint.setColor(SK_ColorBLACK); |
| 85 | 85 |
| 86 SkRect r = SkRect::MakeWH((SkScalar)fDiffuseBitmap.width(), | 86 SkRect r = SkRect::MakeWH((SkScalar)fDiffuseBitmap.width(), |
| 87 (SkScalar)fDiffuseBitmap.height()); | 87 (SkScalar)fDiffuseBitmap.height()); |
| 88 canvas->drawRect(r, paint); | 88 canvas->drawRect(r, paint); |
| 89 | 89 |
| 90 // so we're constantly updating | 90 // so we're constantly updating |
| 91 this->inval(NULL); | 91 this->inval(nullptr); |
| 92 } | 92 } |
| 93 | 93 |
| 94 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) ove
rride { | 94 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) ove
rride { |
| 95 this->inval(NULL); | 95 this->inval(nullptr); |
| 96 return this->INHERITED::onFindClickHandler(x, y, modi); | 96 return this->INHERITED::onFindClickHandler(x, y, modi); |
| 97 } | 97 } |
| 98 | 98 |
| 99 private: | 99 private: |
| 100 typedef SampleView INHERITED; | 100 typedef SampleView INHERITED; |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 ////////////////////////////////////////////////////////////////////////////// | 103 ////////////////////////////////////////////////////////////////////////////// |
| 104 | 104 |
| 105 static SkView* MyFactory() { return new LightingView; } | 105 static SkView* MyFactory() { return new LightingView; } |
| 106 static SkViewRegister reg(MyFactory); | 106 static SkViewRegister reg(MyFactory); |
| OLD | NEW |