| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkImageGenerator.h" | 10 #include "SkImageGenerator.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 surface->getCanvas()->scale(newWidth / src.width(), newHeight / src.height()
); | 162 surface->getCanvas()->scale(newWidth / src.width(), newHeight / src.height()
); |
| 163 surface->getCanvas()->translate(-src.x(), -src.y()); | 163 surface->getCanvas()->translate(-src.x(), -src.y()); |
| 164 | 164 |
| 165 SkPaint paint; | 165 SkPaint paint; |
| 166 paint.setXfermodeMode(SkXfermode::kSrc_Mode); | 166 paint.setXfermodeMode(SkXfermode::kSrc_Mode); |
| 167 paint.setFilterQuality(quality); | 167 paint.setFilterQuality(quality); |
| 168 surface->getCanvas()->drawImage(this, 0, 0, &paint); | 168 surface->getCanvas()->drawImage(this, 0, 0, &paint); |
| 169 return surface->newImageSnapshot(); | 169 return surface->newImageSnapshot(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 ////////////////////////////////////////////////////////////////////////////////
////// |
| 172 | 173 |
| 174 #if !SK_SUPPORT_GPU |
| 175 |
| 176 SkImage* SkImage::NewFromTexture(GrContext*, const GrBackendTextureDesc&, SkAlph
aType) { |
| 177 return NULL; |
| 178 } |
| 179 |
| 180 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk
AlphaType) { |
| 181 return NULL; |
| 182 } |
| 183 |
| 184 #endif |
| OLD | NEW |