| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 SkSpecialImage_DEFINED | 8 #ifndef SkSpecialImage_DEFINED |
| 9 #define SkSpecialImage_DEFINED | 9 #define SkSpecialImage_DEFINED |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 */ | 98 */ |
| 99 sk_sp<SkSpecialImage> makeSubset(const SkIRect& subset) const; | 99 sk_sp<SkSpecialImage> makeSubset(const SkIRect& subset) const; |
| 100 | 100 |
| 101 /** | 101 /** |
| 102 * Extract a subset of this special image and return it as an SkImage. | 102 * Extract a subset of this special image and return it as an SkImage. |
| 103 * It may or may not point to the same backing memory. | 103 * It may or may not point to the same backing memory. |
| 104 * TODO: switch this to makeSurface once we resolved the naming issue | 104 * TODO: switch this to makeSurface once we resolved the naming issue |
| 105 */ | 105 */ |
| 106 sk_sp<SkImage> makeTightSubset(const SkIRect& subset) const; | 106 sk_sp<SkImage> makeTightSubset(const SkIRect& subset) const; |
| 107 | 107 |
| 108 // These three internal methods will go away (see skbug.com/4965) | |
| 109 bool internal_getBM(SkBitmap* result); | |
| 110 static sk_sp<SkSpecialImage> internal_fromBM(const SkBitmap&, const SkSurfac
eProps*); | |
| 111 | |
| 112 // TODO: hide this when GrLayerHoister uses SkSpecialImages more fully (see
skbug.com/5063) | 108 // TODO: hide this when GrLayerHoister uses SkSpecialImages more fully (see
skbug.com/5063) |
| 113 /** | 109 /** |
| 114 * If the SpecialImage is backed by a gpu texture, return true. | 110 * If the SpecialImage is backed by a gpu texture, return true. |
| 115 */ | 111 */ |
| 116 bool isTextureBacked() const; | 112 bool isTextureBacked() const; |
| 117 | 113 |
| 118 /** | 114 /** |
| 119 * Return the GrContext if the SkSpecialImage is GrTexture-backed | 115 * Return the GrContext if the SkSpecialImage is GrTexture-backed |
| 120 */ | 116 */ |
| 121 GrContext* getContext() const; | 117 GrContext* getContext() const; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 142 | 138 |
| 143 private: | 139 private: |
| 144 const SkSurfaceProps fProps; | 140 const SkSurfaceProps fProps; |
| 145 const SkIRect fSubset; | 141 const SkIRect fSubset; |
| 146 const uint32_t fUniqueID; | 142 const uint32_t fUniqueID; |
| 147 | 143 |
| 148 typedef SkRefCnt INHERITED; | 144 typedef SkRefCnt INHERITED; |
| 149 }; | 145 }; |
| 150 | 146 |
| 151 #endif | 147 #endif |
| OLD | NEW |