| 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 "SkBitmap.h" | 8 #include "SkBitmap.h" | 
| 9 #include "SkBitmapController.h" | 9 #include "SkBitmapController.h" | 
| 10 #include "SkMatrix.h" | 10 #include "SkMatrix.h" | 
|  | 11 #include "SkTemplates.h" | 
| 11 | 12 | 
| 12 ////////////////////////////////////////////////////////////////////////////////
     /////////////////// | 13 ////////////////////////////////////////////////////////////////////////////////
     /////////////////// | 
| 13 | 14 | 
| 14 static bool valid_for_drawing(const SkBitmap& bm) { | 15 static bool valid_for_drawing(const SkBitmap& bm) { | 
| 15     if (0 == bm.width() || 0 == bm.height()) { | 16     if (0 == bm.width() || 0 == bm.height()) { | 
| 16         return false;   // nothing to draw | 17         return false;   // nothing to draw | 
| 17     } | 18     } | 
| 18     if (NULL == bm.pixelRef()) { | 19     if (NULL == bm.pixelRef()) { | 
| 19         return false;   // no pixels to read | 20         return false;   // no pixels to read | 
| 20     } | 21     } | 
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 217                   fResultBitmap.getColorTable()); | 218                   fResultBitmap.getColorTable()); | 
| 218 } | 219 } | 
| 219 | 220 | 
| 220 SkBitmapController::State* SkDefaultBitmapController::onRequestBitmap(const SkBi
     tmap& bm, | 221 SkBitmapController::State* SkDefaultBitmapController::onRequestBitmap(const SkBi
     tmap& bm, | 
| 221                                                                       const SkMa
     trix& inverse, | 222                                                                       const SkMa
     trix& inverse, | 
| 222                                                                       SkFilterQu
     ality quality, | 223                                                                       SkFilterQu
     ality quality, | 
| 223                                                                       void* stor
     age, size_t size) { | 224                                                                       void* stor
     age, size_t size) { | 
| 224     return SkInPlaceNewCheck<SkDefaultBitmapControllerState>(storage, size, bm, 
     inverse, quality); | 225     return SkInPlaceNewCheck<SkDefaultBitmapControllerState>(storage, size, bm, 
     inverse, quality); | 
| 225 } | 226 } | 
| 226 | 227 | 
| OLD | NEW | 
|---|