| 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" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 y += r.height() * 4 / 3; | 151 y += r.height() * 4 / 3; |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 | 154 |
| 155 if (NULL != textCanvas) { | 155 if (NULL != textCanvas) { |
| 156 SkASSERT(NULL == fTextPicture); | 156 SkASSERT(NULL == fTextPicture); |
| 157 fTextPicture.reset(recorder.endRecording()); | 157 fTextPicture.reset(recorder.endRecording()); |
| 158 } | 158 } |
| 159 | 159 |
| 160 SkASSERT(NULL != fTextPicture); | 160 SkASSERT(NULL != fTextPicture); |
| 161 canvas->drawPicture(*fTextPicture); | 161 canvas->drawPicture(fTextPicture); |
| 162 } | 162 } |
| 163 | 163 |
| 164 private: | 164 private: |
| 165 typedef SampleView INHERITED; | 165 typedef SampleView INHERITED; |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 ////////////////////////////////////////////////////////////////////////////// | 168 ////////////////////////////////////////////////////////////////////////////// |
| 169 | 169 |
| 170 static SkView* MyFactory() { return new TilingView; } | 170 static SkView* MyFactory() { return new TilingView; } |
| 171 static SkViewRegister reg(MyFactory); | 171 static SkViewRegister reg(MyFactory); |
| OLD | NEW |