aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-11 12:23:17 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-11 12:23:30 +0000
commit934292170bade335f972a050a2f64d2cca9ca299 (patch)
tree86ead758c52182bbd5c806d7932ad8983d19f329 /include
parentd83ec0441279b79551b4ecb4598696249ea55145 (diff)
Revert "Rm makeRenderTargetContext in favor of deferred version"
This reverts commit d83ec0441279b79551b4ecb4598696249ea55145. Reason for revert: various bot failures Original change's description: > Rm makeRenderTargetContext in favor of deferred version > > Change-Id: Ifdf67453607256ba7cdb0837263377bd83907212 > Reviewed-on: https://skia-review.googlesource.com/13001 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4e67a20cbe658b24725dcf386ac8bfdd127647ea Reviewed-on: https://skia-review.googlesource.com/13131 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrContext.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 93b292d6ad..d820202ca8 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -183,12 +183,12 @@ public:
*/
int getRecommendedSampleCount(GrPixelConfig config, SkScalar dpi) const;
- /*
- * Create a new render target context backed by a deferred-style
- * GrRenderTargetProxy. We guarantee that "asTextureProxy" will succeed for
- * renderTargetContexts created via this entry point.
+ /**
+ * Create both a GrRenderTarget and a matching GrRenderTargetContext to wrap it.
+ * We guarantee that "asTexture" will succeed for renderTargetContexts created
+ * via this entry point.
*/
- sk_sp<GrRenderTargetContext> makeDeferredRenderTargetContext(
+ sk_sp<GrRenderTargetContext> makeRenderTargetContext(
SkBackingFit fit,
int width, int height,
GrPixelConfig config,
@@ -197,12 +197,36 @@ public:
GrSurfaceOrigin origin = kBottomLeft_GrSurfaceOrigin,
const SkSurfaceProps* surfaceProps = nullptr,
SkBudgeted = SkBudgeted::kYes);
+
+ // Create a new render target context as above but have it backed by a deferred-style
+ // GrRenderTargetProxy rather than one that is backed by an actual GrRenderTarget
+ sk_sp<GrRenderTargetContext> makeDeferredRenderTargetContext(
+ SkBackingFit fit,
+ int width, int height,
+ GrPixelConfig config,
+ sk_sp<SkColorSpace> colorSpace,
+ int sampleCnt = 0,
+ GrSurfaceOrigin origin = kBottomLeft_GrSurfaceOrigin,
+ const SkSurfaceProps* surfaceProps = nullptr,
+ SkBudgeted = SkBudgeted::kYes);
/*
* This method will attempt to create a renderTargetContext that has, at least, the number of
* channels and precision per channel as requested in 'config' (e.g., A8 and 888 can be
* converted to 8888). It may also swizzle the channels (e.g., BGRA -> RGBA).
* SRGB-ness will be preserved.
*/
+ sk_sp<GrRenderTargetContext> makeRenderTargetContextWithFallback(
+ SkBackingFit fit,
+ int width, int height,
+ GrPixelConfig config,
+ sk_sp<SkColorSpace> colorSpace,
+ int sampleCnt = 0,
+ GrSurfaceOrigin origin = kBottomLeft_GrSurfaceOrigin,
+ const SkSurfaceProps* surfaceProps = nullptr,
+ SkBudgeted budgeted = SkBudgeted::kYes);
+
+ // Create a new render target context as above but have it backed by a deferred-style
+ // GrRenderTargetProxy rather than one that is backed by an actual GrRenderTarget
sk_sp<GrRenderTargetContext> makeDeferredRenderTargetContextWithFallback(
SkBackingFit fit,
int width, int height,