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 GrContext_DEFINED | 8 #ifndef GrContext_DEFINED |
9 #define GrContext_DEFINED | 9 #define GrContext_DEFINED |
10 | 10 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 * @return sample count that should be perform well and have good enough | 177 * @return sample count that should be perform well and have good enough |
178 * rendering quality for the display. Alternatively returns 0 if | 178 * rendering quality for the display. Alternatively returns 0 if |
179 * MSAA is not supported or recommended to be used by default. | 179 * MSAA is not supported or recommended to be used by default. |
180 */ | 180 */ |
181 int getRecommendedSampleCount(GrPixelConfig config, SkScalar dpi) const; | 181 int getRecommendedSampleCount(GrPixelConfig config, SkScalar dpi) const; |
182 | 182 |
183 /** | 183 /** |
184 * Create both a GrRenderTarget and a matching GrDrawContext to wrap it. | 184 * Create both a GrRenderTarget and a matching GrDrawContext to wrap it. |
185 * We guarantee that "asTexture" will succeed for drawContexts created | 185 * We guarantee that "asTexture" will succeed for drawContexts created |
186 * via this entry point. | 186 * via this entry point. |
187 * This method will check the renderability of 'config' and fallback to | |
bsalomon
2016/09/01 19:47:05
Should we specifically call out that the set of ch
robertphillips
2016/09/01 20:52:54
Done.
| |
188 * an alternate config if necessary (e.g., A8 and 888 -> 8888) | |
187 */ | 189 */ |
188 sk_sp<GrDrawContext> makeDrawContext(SkBackingFit fit, | 190 sk_sp<GrDrawContext> makeDrawContext(SkBackingFit fit, |
189 int width, int height, | 191 int width, int height, |
190 GrPixelConfig config, | 192 GrPixelConfig config, |
191 sk_sp<SkColorSpace> colorSpace, | 193 sk_sp<SkColorSpace> colorSpace, |
192 int sampleCnt = 0, | 194 int sampleCnt = 0, |
193 GrSurfaceOrigin origin = kDefault_GrSur faceOrigin, | 195 GrSurfaceOrigin origin = kDefault_GrSur faceOrigin, |
194 const SkSurfaceProps* surfaceProps = nu llptr, | 196 const SkSurfaceProps* surfaceProps = nu llptr, |
195 SkBudgeted = SkBudgeted::kYes); | 197 SkBudgeted = SkBudgeted::kYes); |
196 | 198 |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
483 SkAutoTUnref<const GrCaps> fCaps; | 485 SkAutoTUnref<const GrCaps> fCaps; |
484 uint32_t fContextUniqueID; | 486 uint32_t fContextUniqueID; |
485 | 487 |
486 friend class GrContext; | 488 friend class GrContext; |
487 friend class SkImage; | 489 friend class SkImage; |
488 | 490 |
489 typedef SkRefCnt INHERITED; | 491 typedef SkRefCnt INHERITED; |
490 }; | 492 }; |
491 | 493 |
492 #endif | 494 #endif |
OLD | NEW |