diff options
author | 2017-06-05 09:26:07 -0400 | |
---|---|---|
committer | 2017-06-05 14:03:10 +0000 | |
commit | eee4d6e4e8cc5c4c79f065abcc3ce609f71238f9 (patch) | |
tree | 9a855a9892a8b3017370164355b88c2a4ac9c89c /src/gpu/ops/GrCopySurfaceOp.h | |
parent | 9beafc41afa3c78ffa12649dcde73628c277da9c (diff) |
Make instantiate return a Boolean
From an off-line conversation:
The longer term idea will be to create a helper class isolates the
ability to instantiate proxies until flush time. The peek* methods
could then be moved to GrSurfaceProxy.
Change-Id: I8e8c02c098475b77d515791c0d6b81f7e4a327dd
Reviewed-on: https://skia-review.googlesource.com/18076
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/ops/GrCopySurfaceOp.h')
-rw-r--r-- | src/gpu/ops/GrCopySurfaceOp.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/ops/GrCopySurfaceOp.h b/src/gpu/ops/GrCopySurfaceOp.h index f1dac8fdfa..6c804088dd 100644 --- a/src/gpu/ops/GrCopySurfaceOp.h +++ b/src/gpu/ops/GrCopySurfaceOp.h @@ -56,13 +56,13 @@ private: void onExecute(GrOpFlushState* state) override { SkASSERT(!state->commandBuffer()); - GrSurface* dst = fDst.get()->instantiate(state->resourceProvider()); - GrSurface* src = fSrc.get()->instantiate(state->resourceProvider()); - if (!dst || !src) { + if (!fDst.get()->instantiate(state->resourceProvider()) || + !fSrc.get()->instantiate(state->resourceProvider())) { return; } - state->gpu()->copySurface(dst, src, fSrcRect, fDstPoint); + state->gpu()->copySurface(fDst.get()->priv().peekSurface(), + fSrc.get()->priv().peekSurface(), fSrcRect, fDstPoint); } // For RenderTargetContexts 'fDst' is redundant with the RenderTarget that will be passed |