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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 static sk_sp<SkSpecialImage> MakeFromRaster(const SkIRect& subset, | 73 static sk_sp<SkSpecialImage> MakeFromRaster(const SkIRect& subset, |
74 const SkBitmap&, | 74 const SkBitmap&, |
75 const SkSurfaceProps* = nullptr)
; | 75 const SkSurfaceProps* = nullptr)
; |
76 #if SK_SUPPORT_GPU | 76 #if SK_SUPPORT_GPU |
77 static sk_sp<SkSpecialImage> MakeFromGpu(const SkIRect& subset, | 77 static sk_sp<SkSpecialImage> MakeFromGpu(const SkIRect& subset, |
78 uint32_t uniqueID, | 78 uint32_t uniqueID, |
79 sk_sp<GrTexture>, | 79 sk_sp<GrTexture>, |
80 const SkSurfaceProps* = nullptr, | 80 const SkSurfaceProps* = nullptr, |
81 SkAlphaType at = kPremul_SkAlphaTyp
e); | 81 SkAlphaType at = kPremul_SkAlphaTyp
e); |
82 #endif | 82 #endif |
83 static sk_sp<SkSpecialImage> MakeFromPixmap(const SkIRect& subset, | |
84 const SkPixmap&, | |
85 RasterReleaseProc, | |
86 ReleaseContext, | |
87 const SkSurfaceProps* = nullptr)
; | |
88 | 83 |
89 /** | 84 /** |
90 * Create a new special surface with a backend that is compatible with this
special image. | 85 * Create a new special surface with a backend that is compatible with this
special image. |
91 */ | 86 */ |
92 sk_sp<SkSpecialSurface> makeSurface(const SkImageInfo&) const; | 87 sk_sp<SkSpecialSurface> makeSurface(const SkImageInfo&) const; |
93 | 88 |
94 /** | 89 /** |
95 * Create a new surface with a backend that is compatible with this special
image. | 90 * Create a new surface with a backend that is compatible with this special
image. |
96 * TODO: switch this to makeSurface once we resolved the naming issue | 91 * TODO: switch this to makeSurface once we resolved the naming issue |
97 */ | 92 */ |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 142 |
148 private: | 143 private: |
149 const SkSurfaceProps fProps; | 144 const SkSurfaceProps fProps; |
150 const SkIRect fSubset; | 145 const SkIRect fSubset; |
151 const uint32_t fUniqueID; | 146 const uint32_t fUniqueID; |
152 | 147 |
153 typedef SkRefCnt INHERITED; | 148 typedef SkRefCnt INHERITED; |
154 }; | 149 }; |
155 | 150 |
156 #endif | 151 #endif |
OLD | NEW |