| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 int width, int height, | 190 int width, int height, |
| 191 GrPixelConfig config, | 191 GrPixelConfig config, |
| 192 sk_sp<SkColorSpace> colorSpace, | 192 sk_sp<SkColorSpace> colorSpace, |
| 193 int sampleCnt = 0, | 193 int sampleCnt = 0, |
| 194 GrSurfaceOrigin origin = kDefau
lt_GrSurfaceOrigin, | 194 GrSurfaceOrigin origin = kDefau
lt_GrSurfaceOrigin, |
| 195 const SkSurfaceProps* surfacePr
ops = nullptr, | 195 const SkSurfaceProps* surfacePr
ops = nullptr, |
| 196 SkBudgeted = SkBudgeted::kYes); | 196 SkBudgeted = SkBudgeted::kYes); |
| 197 | 197 |
| 198 // Create a new render target context as above but have it backed by a defer
red-style | 198 // Create a new render target context as above but have it backed by a defer
red-style |
| 199 // GrRenderTargetProxy rather than one that is backed by an actual GrRenderT
arget | 199 // GrRenderTargetProxy rather than one that is backed by an actual GrRenderT
arget |
| 200 sk_sp<GrRenderTargetContext> makeDeferredRenderTargetContext(SkBackingFit fi
t, | 200 sk_sp<GrRenderTargetContext> makeDeferredRenderTargetContext( |
| 201 SkBackingFit fit, |
| 201 int width, int height, | 202 int width, int height, |
| 202 GrPixelConfig config, | 203 GrPixelConfig config, |
| 203 sk_sp<SkColorSpace> colorSpace, | 204 sk_sp<SkColorSpace> colorSpace, |
| 204 int sampleCnt = 0, | 205 int sampleCnt = 0, |
| 205 GrSurfaceOrigin origin = kDefau
lt_GrSurfaceOrigin, | 206 GrSurfaceOrigin origin = kDefau
lt_GrSurfaceOrigin, |
| 206 const SkSurfaceProps* surfacePr
ops = nullptr, | 207 const SkSurfaceProps* surfacePr
ops = nullptr, |
| 207 SkBudgeted = SkBudgeted::kYes); | 208 SkBudgeted = SkBudgeted::kYes); |
| 208 /* | 209 /* |
| 209 * This method will attempt to create a renderTargetContext that has, at lea
st, the number of | 210 * This method will attempt to create a renderTargetContext that has, at lea
st, the number of |
| 210 * channels and precision per channel as requested in 'config' (e.g., A8 and
888 can be | 211 * channels and precision per channel as requested in 'config' (e.g., A8 and
888 can be |
| 211 * converted to 8888). It may also swizzle the channels (e.g., BGRA -> RGBA)
. | 212 * converted to 8888). It may also swizzle the channels (e.g., BGRA -> RGBA)
. |
| 212 * SRGB-ness will be preserved. | 213 * SRGB-ness will be preserved. |
| 213 */ | 214 */ |
| 214 sk_sp<GrRenderTargetContext> makeRenderTargetContextWithFallback( | 215 sk_sp<GrRenderTargetContext> makeRenderTargetContextWithFallback( |
| 215 SkBackingFit fit, | 216 SkBackingFit fit, |
| 216 int width, int height, | 217 int width, int height, |
| 217 GrPixelConfig config, | 218 GrPixelConfig config, |
| 218 sk_sp<SkColorSpace> colorSpace, | 219 sk_sp<SkColorSpace> colorSpace, |
| 219 int sampleCnt = 0, | 220 int sampleCnt = 0, |
| 220 GrSurfaceOrigin origin = kDefau
lt_GrSurfaceOrigin, | 221 GrSurfaceOrigin origin = kDefau
lt_GrSurfaceOrigin, |
| 221 const SkSurfaceProps* surfacePr
ops = nullptr, | 222 const SkSurfaceProps* surfacePr
ops = nullptr, |
| 222 SkBudgeted budgeted = SkBudgete
d::kYes); | 223 SkBudgeted budgeted = SkBudgete
d::kYes); |
| 223 | 224 |
| 225 // Create a new render target context as above but have it backed by a defer
red-style |
| 226 // GrRenderTargetProxy rather than one that is backed by an actual GrRenderT
arget |
| 227 sk_sp<GrRenderTargetContext> makeDeferredRenderTargetContextWithFallback( |
| 228 SkBackingFit fit, |
| 229 int width, int height, |
| 230 GrPixelConfig config, |
| 231 sk_sp<SkColorSpace> colorSpace, |
| 232 int sampleCnt = 0, |
| 233 GrSurfaceOrigin origin = kDefau
lt_GrSurfaceOrigin, |
| 234 const SkSurfaceProps* surfacePr
ops = nullptr, |
| 235 SkBudgeted budgeted = SkBudgete
d::kYes); |
| 236 |
| 224 /////////////////////////////////////////////////////////////////////////// | 237 /////////////////////////////////////////////////////////////////////////// |
| 225 // Misc. | 238 // Misc. |
| 226 | 239 |
| 227 /** | 240 /** |
| 228 * Call to ensure all drawing to the context has been issued to the | 241 * Call to ensure all drawing to the context has been issued to the |
| 229 * underlying 3D API. | 242 * underlying 3D API. |
| 230 */ | 243 */ |
| 231 void flush(); | 244 void flush(); |
| 232 | 245 |
| 233 /** | 246 /** |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 sk_sp<const GrCaps> fCaps; | 494 sk_sp<const GrCaps> fCaps; |
| 482 uint32_t fContextUniqueID; | 495 uint32_t fContextUniqueID; |
| 483 | 496 |
| 484 friend class GrContext; | 497 friend class GrContext; |
| 485 friend class SkImage; | 498 friend class SkImage; |
| 486 | 499 |
| 487 typedef SkRefCnt INHERITED; | 500 typedef SkRefCnt INHERITED; |
| 488 }; | 501 }; |
| 489 | 502 |
| 490 #endif | 503 #endif |
| OLD | NEW |