diff options
author | Robert Phillips <robertphillips@google.com> | 2016-12-14 08:46:47 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-14 14:35:52 +0000 |
commit | 2734136b68cfb5fbde5a5929a203d5e26f4afc25 (patch) | |
tree | 404e71854700dc91c20d9012d8c1173f3df16add /src/gpu | |
parent | 0d413f0f455c984eacf46c9d5cb0978d7b73357f (diff) |
Add asDeferredTexture & asDeferredRenderTarget helpers to GrSurfaceContext
These are proving useful in the read/write-Pixels migration
Change-Id: I297f31968362d205977b769808320b1dc06249df
Reviewed-on: https://skia-review.googlesource.com/5936
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrTextureContext.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrTextureContext.cpp b/src/gpu/GrTextureContext.cpp index 22620fed0f..59dae3f0f2 100644 --- a/src/gpu/GrTextureContext.cpp +++ b/src/gpu/GrTextureContext.cpp @@ -45,6 +45,12 @@ GrTextureContext::~GrTextureContext() { SkSafeUnref(fOpList); } +GrRenderTargetProxy* GrTextureContext::asDeferredRenderTarget() { + // If the proxy can return an RTProxy it should've been wrapped in a RTContext + SkASSERT(!fTextureProxy->asRenderTargetProxy()); + return nullptr; +} + GrTextureOpList* GrTextureContext::getOpList() { ASSERT_SINGLE_OWNER SkDEBUGCODE(this->validate();) |