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 SkSpecialSurface_DEFINED | 8 #ifndef SkSpecialSurface_DEFINED |
9 #define SkSpecialSurface_DEFINED | 9 #define SkSpecialSurface_DEFINED |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 */ | 50 */ |
51 sk_sp<SkSpecialImage> makeImageSnapshot(); | 51 sk_sp<SkSpecialImage> makeImageSnapshot(); |
52 | 52 |
53 #if SK_SUPPORT_GPU | 53 #if SK_SUPPORT_GPU |
54 /** | 54 /** |
55 * Allocate a new GPU-backed SkSpecialSurface. If the requested surface can
not | 55 * Allocate a new GPU-backed SkSpecialSurface. If the requested surface can
not |
56 * be created, nullptr will be returned. | 56 * be created, nullptr will be returned. |
57 */ | 57 */ |
58 static sk_sp<SkSpecialSurface> MakeRenderTarget(GrContext*, | 58 static sk_sp<SkSpecialSurface> MakeRenderTarget(GrContext*, |
59 int width, int height, | 59 int width, int height, |
60 GrPixelConfig config); | 60 GrPixelConfig config, |
| 61 sk_sp<SkColorSpace> colorSpa
ce); |
61 #endif | 62 #endif |
62 | 63 |
63 /** | 64 /** |
64 * Use and existing SkBitmap as the backing store. | 65 * Use and existing SkBitmap as the backing store. |
65 */ | 66 */ |
66 static sk_sp<SkSpecialSurface> MakeFromBitmap(const SkIRect& subset, SkBitma
p& bm, | 67 static sk_sp<SkSpecialSurface> MakeFromBitmap(const SkIRect& subset, SkBitma
p& bm, |
67 const SkSurfaceProps* = nullpt
r); | 68 const SkSurfaceProps* = nullpt
r); |
68 | 69 |
69 /** | 70 /** |
70 * Return a new CPU-backed surface, with the memory for the pixels automati
cally | 71 * Return a new CPU-backed surface, with the memory for the pixels automati
cally |
(...skipping 13 matching lines...) Expand all Loading... |
84 const SkIRect& subset() const { return fSubset; } | 85 const SkIRect& subset() const { return fSubset; } |
85 | 86 |
86 private: | 87 private: |
87 const SkSurfaceProps fProps; | 88 const SkSurfaceProps fProps; |
88 const SkIRect fSubset; | 89 const SkIRect fSubset; |
89 | 90 |
90 typedef SkRefCnt INHERITED; | 91 typedef SkRefCnt INHERITED; |
91 }; | 92 }; |
92 | 93 |
93 #endif | 94 #endif |
OLD | NEW |