| 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 #ifndef SkPixmap_DEFINED | 8 #ifndef SkPixmap_DEFINED |
| 9 #define SkPixmap_DEFINED | 9 #define SkPixmap_DEFINED |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 } | 38 } |
| 39 | 39 |
| 40 void reset(); | 40 void reset(); |
| 41 void reset(const SkImageInfo& info, const void* addr, size_t rowBytes, | 41 void reset(const SkImageInfo& info, const void* addr, size_t rowBytes, |
| 42 SkColorTable* ctable = NULL); | 42 SkColorTable* ctable = NULL); |
| 43 void reset(const SkImageInfo& info) { | 43 void reset(const SkImageInfo& info) { |
| 44 this->reset(info, NULL, 0, NULL); | 44 this->reset(info, NULL, 0, NULL); |
| 45 } | 45 } |
| 46 | 46 |
| 47 // overrides the colorspace in the SkImageInfo of the pixmap |
| 48 void setColorSpace(sk_sp<SkColorSpace>); |
| 49 |
| 47 /** | 50 /** |
| 48 * If supported, set this pixmap to point to the pixels in the specified ma
sk and return true. | 51 * If supported, set this pixmap to point to the pixels in the specified ma
sk and return true. |
| 49 * On failure, return false and set this pixmap to empty. | 52 * On failure, return false and set this pixmap to empty. |
| 50 */ | 53 */ |
| 51 bool SK_WARN_UNUSED_RESULT reset(const SkMask&); | 54 bool SK_WARN_UNUSED_RESULT reset(const SkMask&); |
| 52 | 55 |
| 53 /** | 56 /** |
| 54 * Computes the intersection of area and this pixmap. If that intersection
is non-empty, | 57 * Computes the intersection of area and this pixmap. If that intersection
is non-empty, |
| 55 * set subset to that intersection and return true. | 58 * set subset to that intersection and return true. |
| 56 * | 59 * |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 private: | 246 private: |
| 244 void (*fUnlockProc)(void*); | 247 void (*fUnlockProc)(void*); |
| 245 void* fUnlockContext; | 248 void* fUnlockContext; |
| 246 SkPixmap fPixmap; | 249 SkPixmap fPixmap; |
| 247 bool fIsLocked; | 250 bool fIsLocked; |
| 248 | 251 |
| 249 friend class SkBitmap; | 252 friend class SkBitmap; |
| 250 }; | 253 }; |
| 251 | 254 |
| 252 #endif | 255 #endif |
| OLD | NEW |