| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkImageGenerator.h" | 8 #include "SkImageGenerator.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkMatrix.h" | 10 #include "SkMatrix.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 SkMatrix matrix = fMatrix; | 105 SkMatrix matrix = fMatrix; |
| 106 if (subset) { | 106 if (subset) { |
| 107 matrix.postTranslate(-subset->x(), -subset->y()); | 107 matrix.postTranslate(-subset->x(), -subset->y()); |
| 108 } | 108 } |
| 109 surface->getCanvas()->clear(0); // does NewRenderTarget promise to do this f
or us? | 109 surface->getCanvas()->clear(0); // does NewRenderTarget promise to do this f
or us? |
| 110 surface->getCanvas()->drawPicture(fPicture, &matrix, fPaint.getMaybeNull()); | 110 surface->getCanvas()->drawPicture(fPicture, &matrix, fPaint.getMaybeNull()); |
| 111 SkAutoTUnref<SkImage> image(surface->newImageSnapshot()); | 111 SkAutoTUnref<SkImage> image(surface->newImageSnapshot()); |
| 112 if (!image.get()) { | 112 if (!image.get()) { |
| 113 return nullptr; | 113 return nullptr; |
| 114 } | 114 } |
| 115 |
| 116 image->getTexture()->fException2 = true; |
| 117 |
| 115 return SkSafeRef(image->getTexture()); | 118 return SkSafeRef(image->getTexture()); |
| 116 } | 119 } |
| 117 #endif | 120 #endif |
| OLD | NEW |