OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 SkGpuDevice_DEFINED | 8 #ifndef SkGpuDevice_DEFINED |
9 #define SkGpuDevice_DEFINED | 9 #define SkGpuDevice_DEFINED |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 kClear_InitContents, | 35 kClear_InitContents, |
36 kUninit_InitContents | 36 kUninit_InitContents |
37 }; | 37 }; |
38 | 38 |
39 /** | 39 /** |
40 * Creates an SkGpuDevice from a GrRenderTarget. | 40 * Creates an SkGpuDevice from a GrRenderTarget. |
41 * TODO: rm this factory. It is used by SkSurface::MakeRenderTargetDirect, | 41 * TODO: rm this factory. It is used by SkSurface::MakeRenderTargetDirect, |
42 * MakeFromBackendTexture, MakeFromBackendRenderTarget, | 42 * MakeFromBackendTexture, MakeFromBackendRenderTarget, |
43 * and MakeFromBackendTextureAsRenderTarget. Only the first is worriso
me. | 43 * and MakeFromBackendTextureAsRenderTarget. Only the first is worriso
me. |
44 */ | 44 */ |
45 static sk_sp<SkGpuDevice> Make(sk_sp<GrRenderTarget> target, | 45 static sk_sp<SkGpuDevice> Make(sk_sp<GrRenderTarget> target, |
| 46 sk_sp<SkColorSpace> colorSpace, |
46 const SkSurfaceProps*, | 47 const SkSurfaceProps*, |
47 InitContents); | 48 InitContents); |
48 | 49 |
49 /** | 50 /** |
50 * Creates an SkGpuDevice from a GrDrawContext whose backing width/height is | 51 * Creates an SkGpuDevice from a GrDrawContext whose backing width/height is |
51 * different than its actual width/height (e.g., approx-match scratch textur
e). | 52 * different than its actual width/height (e.g., approx-match scratch textur
e). |
52 */ | 53 */ |
53 static sk_sp<SkBaseDevice> Make(sk_sp<GrDrawContext> drawContext, | 54 static sk_sp<SkBaseDevice> Make(sk_sp<GrDrawContext> drawContext, |
54 int width, int height, | 55 int width, int height, |
55 InitContents); | 56 InitContents); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 const SkImageInfo&, | 270 const SkImageInfo&, |
270 int sampleCount, | 271 int sampleCount, |
271 const SkSurfaceProps*); | 272 const SkSurfaceProps*); |
272 | 273 |
273 friend class GrAtlasTextContext; | 274 friend class GrAtlasTextContext; |
274 friend class SkSurface_Gpu; // for access to surfaceProps | 275 friend class SkSurface_Gpu; // for access to surfaceProps |
275 typedef SkBaseDevice INHERITED; | 276 typedef SkBaseDevice INHERITED; |
276 }; | 277 }; |
277 | 278 |
278 #endif | 279 #endif |
OLD | NEW |